public function load($ids)
    {
        settype($ids, 'array');

        $types = $this->getTypes();
        $libraries = $this->getList();

        foreach ($ids as $key => $id) {

            if ($this->isLoaded($id)) {
                unset($ids[$key]);
                continue;
            }

            if (empty($libraries[$id]['type'])) {
                unset($ids[$key]);
                continue;
            }

            if (empty($types[$libraries[$id]['type']]['load'])) {
                unset($ids[$key]);
            }
        }

        $sorted = $this->graph->sort($ids, $libraries);

        if (empty($sorted)) {
            return false;
        }

        foreach ($this->prepareFiles($sorted, $libraries) as $file) {
            require_once $file;
        }

        $this->loaded = array_merge($this->loaded, $sorted);
        return true;
    }
public function load($ids)
    {
        settype($ids, 'array');

        $types = $this->getTypes();
        $libraries = $this->getList();

        foreach ($ids as $key => $id) {

            if ($this->isLoaded($id)) {
                unset($ids[$key]);
                continue;
            }

            if (empty($libraries[$id]['type'])) {
                unset($ids[$key]);
                continue;
            }

            if (empty($types[$libraries[$id]['type']]['load'])) {
                unset($ids[$key]);
            }
        }

        $sorted = $this->graph->sort($ids, $libraries);

        if (empty($sorted)) {
            return false;
        }

        foreach ($this->prepareFiles($sorted, $libraries) as $file) {
            require_once $file;
        }

        $this->loaded = array_merge($this->loaded, $sorted);
        return true;
    }
public function load ( $ ids ) { settype ( $ ids , 'array' ) ; $ types = $ this -> getTypes ( ) ; $ libraries = $ this -> getList ( ) ; foreach ( $ ids as $ key => $ id ) { if ( $ this -> isLoaded ( $ id ) ) { unset ( $ ids [ $ key ] ) ; continue ; } if ( empty ( $ libraries [ $ id ] [ 'type' ] ) ) { unset ( $ ids [ $ key ] ) ; continue ; } if ( empty ( $ types [ $ libraries [ $ id ] [ 'type' ] ] [ 'load' ] ) ) { unset ( $ ids [ $ key ] ) ; } } $ sorted = $ this -> graph -> sort ( $ ids , $ libraries ) ; if ( empty ( $ sorted ) ) { return false ; } foreach ( $ this -> prepareFiles ( $ sorted , $ libraries ) as $ file ) { require_once $ file ; } $ this -> loaded = array_merge ( $ this -> loaded , $ sorted ) ; return true ; }
Includes libraries files
@param array|string $ids
@return boolean
Includes libraries files