Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
<?php
1
<?php
Línea 2... Línea -...
2
 
-
 
3
declare(strict_types=1);
2
 
4
/**
3
/**
5
 * SimplePie
4
 * SimplePie
6
 *
5
 *
7
 * A PHP-Based RSS and Atom Feed Framework.
6
 * A PHP-Based RSS and Atom Feed Framework.
Línea 84... Línea 83...
84
     */
83
     */
85
    public function get_data(string $key, $default = null)
84
    public function get_data(string $key, $default = null)
86
    {
85
    {
87
        $data = $this->cache->load();
86
        $data = $this->cache->load();
Línea 88... Línea 87...
88
 
87
 
89
        if (! is_array($data)) {
88
        if (!is_array($data)) {
90
            return $default;
89
            return $default;
Línea 91... Línea 90...
91
        }
90
        }
92
 
91
 
93
        // ignore data if internal cache expiration time is not set
92
        // ignore data if internal cache expiration time is not set
94
        if (! array_key_exists('__cache_expiration_time', $data)) {
93
        if (!array_key_exists('__cache_expiration_time', $data)) {
Línea 95... Línea 94...
95
            return $default;
94
            return $default;
96
        }
95
        }