Library/Compiler.php
private function recursivePreCompile($path)
    {
        if (!is_dir($path)) {
            throw new InvalidArgumentException(
                sprintf(
                    "An invalid path was passed to the compiler. Unable to obtain the '%s%s%s' directory.",
                    getcwd(),
                    \DIRECTORY_SEPARATOR,
                    $path
                )
            );
        }

        /*
         * Pre compile all files.
         */
        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        $files = [];
        foreach ($iterator as $item) {
            if (!$item->isDir()) {
                $files[] = $item->getPathname();
            }
        }

        sort($files, SORT_STRING);
        foreach ($files as $file) {
            $this->preCompile($file);
        }
    }
private function recursivePreCompile($path)
    {
        if (!is_dir($path)) {
            throw new InvalidArgumentException(
                sprintf(
                    "An invalid path was passed to the compiler. Unable to obtain the '%s%s%s' directory.",
                    getcwd(),
                    \DIRECTORY_SEPARATOR,
                    $path
                )
            );
        }

        /*
         * Pre compile all files.
         */
        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($path),
            \RecursiveIteratorIterator::SELF_FIRST
        );

        $files = [];
        foreach ($iterator as $item) {
            if (!$item->isDir()) {
                $files[] = $item->getPathname();
            }
        }

        sort($files, SORT_STRING);
        foreach ($files as $file) {
            $this->preCompile($file);
        }
    }
private function recursivePreCompile ( $ path ) { if ( ! is_dir ( $ path ) ) { throw new InvalidArgumentException ( sprintf ( "An invalid path was passed to the compiler. Unable to obtain the '%s%s%s' directory." , getcwd ( ) , \ DIRECTORY_SEPARATOR , $ path ) ) ; } /*
         * Pre compile all files.
         */ $ iterator = new \ RecursiveIteratorIterator ( new \ RecursiveDirectoryIterator ( $ path ) , \ RecursiveIteratorIterator :: SELF_FIRST ) ; $ files = [ ] ; foreach ( $ iterator as $ item ) { if ( ! $ item -> isDir ( ) ) { $ files [ ] = $ item -> getPathname ( ) ; } } sort ( $ files , SORT_STRING ) ; foreach ( $ files as $ file ) { $ this -> preCompile ( $ file ) ; } }
Recursively pre-compiles all sources found in the given path.

@param string $path

@throws IllegalStateException
@throws InvalidArgumentException
Recursively pre - compiles all sources found in the given path .