src/Jit/ClassLoader.php
public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->_fallbackDirsPsr0 = array_merge(
                    (array) $paths,
                    $this->_fallbackDirsPsr0
                );
            } else {
                $this->_fallbackDirsPsr0 = array_merge(
                    $this->_fallbackDirsPsr0,
                    (array) $paths
                );
            }

            return;
        }

        $first = $prefix[0];
        if (!isset($this->_prefixesPsr0[$first][$prefix])) {
            $this->_prefixesPsr0[$first][$prefix] = (array) $paths;

            return;
        }
        if ($prepend) {
            $this->_prefixesPsr0[$first][$prefix] = array_merge(
                (array) $paths,
                $this->_prefixesPsr0[$first][$prefix]
            );
        } else {
            $this->_prefixesPsr0[$first][$prefix] = array_merge(
                $this->_prefixesPsr0[$first][$prefix],
                (array) $paths
            );
        }
    }
public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->_fallbackDirsPsr0 = array_merge(
                    (array) $paths,
                    $this->_fallbackDirsPsr0
                );
            } else {
                $this->_fallbackDirsPsr0 = array_merge(
                    $this->_fallbackDirsPsr0,
                    (array) $paths
                );
            }

            return;
        }

        $first = $prefix[0];
        if (!isset($this->_prefixesPsr0[$first][$prefix])) {
            $this->_prefixesPsr0[$first][$prefix] = (array) $paths;

            return;
        }
        if ($prepend) {
            $this->_prefixesPsr0[$first][$prefix] = array_merge(
                (array) $paths,
                $this->_prefixesPsr0[$first][$prefix]
            );
        } else {
            $this->_prefixesPsr0[$first][$prefix] = array_merge(
                $this->_prefixesPsr0[$first][$prefix],
                (array) $paths
            );
        }
    }
public function add ( $ prefix , $ paths , $ prepend = false ) { if ( ! $ prefix ) { if ( $ prepend ) { $ this -> _fallbackDirsPsr0 = array_merge ( ( array ) $ paths , $ this -> _fallbackDirsPsr0 ) ; } else { $ this -> _fallbackDirsPsr0 = array_merge ( $ this -> _fallbackDirsPsr0 , ( array ) $ paths ) ; } return ; } $ first = $ prefix [ 0 ] ; if ( ! isset ( $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] ) ) { $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] = ( array ) $ paths ; return ; } if ( $ prepend ) { $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] = array_merge ( ( array ) $ paths , $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] ) ; } else { $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] = array_merge ( $ this -> _prefixesPsr0 [ $ first ] [ $ prefix ] , ( array ) $ paths ) ; } }
Registers a set of PSR-0 directories for a given prefix, either
appending or prepending to the ones previously set for this prefix.

@param string       $prefix  The prefix
@param array|string $paths   The PSR-0 root directories
@param bool         $prepend Whether to prepend the directories
Registers a set of PSR - 0 directories for a given prefix either appending or prepending to the ones previously set for this prefix .