public function load($path)
    {
        list($data, $items) = array(array(), array($path));

        if (substr((string) $path, -4) !== '.php')
        {
            $directory = new \RecursiveDirectoryIterator($path);

            $iterator = new \RecursiveIteratorIterator($directory);

            $regex = new \RegexIterator($iterator, '/^.+\.php$/i', 1);

            $items = (array) array_keys(iterator_to_array($regex));
        }

        foreach ((array) $items as $item)
        {
            $name = $this->rename($item, $path);

            $data = require $item;

            $this->set((string) $name, $data);
        }
    }
public function load($path)
    {
        list($data, $items) = array(array(), array($path));

        if (substr((string) $path, -4) !== '.php')
        {
            $directory = new \RecursiveDirectoryIterator($path);

            $iterator = new \RecursiveIteratorIterator($directory);

            $regex = new \RegexIterator($iterator, '/^.+\.php$/i', 1);

            $items = (array) array_keys(iterator_to_array($regex));
        }

        foreach ((array) $items as $item)
        {
            $name = $this->rename($item, $path);

            $data = require $item;

            $this->set((string) $name, $data);
        }
    }
public function load ( $ path ) { list ( $ data , $ items ) = array ( array ( ) , array ( $ path ) ) ; if ( substr ( ( string ) $ path , - 4 ) !== '.php' ) { $ directory = new \ RecursiveDirectoryIterator ( $ path ) ; $ iterator = new \ RecursiveIteratorIterator ( $ directory ) ; $ regex = new \ RegexIterator ( $ iterator , '/^.+\.php$/i' , 1 ) ; $ items = ( array ) array_keys ( iterator_to_array ( $ regex ) ) ; } foreach ( ( array ) $ items as $ item ) { $ name = $ this -> rename ( $ item , $ path ) ; $ data = require $ item ; $ this -> set ( ( string ) $ name , $ data ) ; } }
Loads an array of values from a specified file or directory.

@param  string $path
@return void
Loads an array of values from a specified file or directory .