protected function compileImport($rawPath, $out, $once = false)
    {
        if ($rawPath[0] === Type::T_STRING) {
            $path = $this->compileStringContent($rawPath);

            if ($path = $this->findImport($path)) {
                if (! $once || ! in_array($path, $this->importedFiles)) {
                    $this->importFile($path, $out);
                    $this->importedFiles[] = $path;
                }

                return true;
            }

            return false;
        }

        if ($rawPath[0] === Type::T_LIST) {
            // handle a list of strings
            if (count($rawPath[2]) === 0) {
                return false;
            }

            foreach ($rawPath[2] as $path) {
                if ($path[0] !== Type::T_STRING) {
                    return false;
                }
            }

            foreach ($rawPath[2] as $path) {
                $this->compileImport($path, $out);
            }

            return true;
        }

        return false;
    }
protected function compileImport($rawPath, $out, $once = false)
    {
        if ($rawPath[0] === Type::T_STRING) {
            $path = $this->compileStringContent($rawPath);

            if ($path = $this->findImport($path)) {
                if (! $once || ! in_array($path, $this->importedFiles)) {
                    $this->importFile($path, $out);
                    $this->importedFiles[] = $path;
                }

                return true;
            }

            return false;
        }

        if ($rawPath[0] === Type::T_LIST) {
            // handle a list of strings
            if (count($rawPath[2]) === 0) {
                return false;
            }

            foreach ($rawPath[2] as $path) {
                if ($path[0] !== Type::T_STRING) {
                    return false;
                }
            }

            foreach ($rawPath[2] as $path) {
                $this->compileImport($path, $out);
            }

            return true;
        }

        return false;
    }
protected function compileImport ( $ rawPath , $ out , $ once = false ) { if ( $ rawPath [ 0 ] === Type :: T_STRING ) { $ path = $ this -> compileStringContent ( $ rawPath ) ; if ( $ path = $ this -> findImport ( $ path ) ) { if ( ! $ once || ! in_array ( $ path , $ this -> importedFiles ) ) { $ this -> importFile ( $ path , $ out ) ; $ this -> importedFiles [ ] = $ path ; } return true ; } return false ; } if ( $ rawPath [ 0 ] === Type :: T_LIST ) { // handle a list of strings if ( count ( $ rawPath [ 2 ] ) === 0 ) { return false ; } foreach ( $ rawPath [ 2 ] as $ path ) { if ( $ path [ 0 ] !== Type :: T_STRING ) { return false ; } } foreach ( $ rawPath [ 2 ] as $ path ) { $ this -> compileImport ( $ path , $ out ) ; } return true ; } return false ; }
Compile import; returns true if the value was something that could be imported

@param array   $rawPath
@param array   $out
@param boolean $once

@return boolean
Compile import ; returns true if the value was something that could be imported