Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 12... Línea 12...
12
    /**
12
    /**
13
     * @param callable|null $fnDispatcher Function dispatching function that accepts
13
     * @param callable|null $fnDispatcher Function dispatching function that accepts
14
     *                                    a function name argument and an array of
14
     *                                    a function name argument and an array of
15
     *                                    function arguments and returns the result.
15
     *                                    function arguments and returns the result.
16
     */
16
     */
17
    public function __construct(callable $fnDispatcher = null)
17
    public function __construct(?callable $fnDispatcher = null)
18
    {
18
    {
19
        $this->fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance();
19
        $this->fnDispatcher = $fnDispatcher ?: FnDispatcher::getInstance();
20
    }
20
    }
Línea 21... Línea 21...
21
 
21
 
Línea 105... Línea 105...
105
                }
105
                }
Línea 106... Línea 106...
106
 
106
 
107
                $merged = [];
107
                $merged = [];
108
                foreach ($value as $values) {
108
                foreach ($value as $values) {
109
                    // Only merge up arrays lists and not hashes
109
                    // Only merge up arrays lists and not hashes
110
                    if (is_array($values) && isset($values[0])) {
110
                    if (is_array($values) && array_key_exists(0, $values)) {
111
                        $merged = array_merge($merged, $values);
111
                        $merged = array_merge($merged, $values);
112
                    } elseif ($values !== $skipElement) {
112
                    } elseif ($values !== $skipElement) {
113
                        $merged[] = $values;
113
                        $merged[] = $values;
114
                    }
114
                    }