pho\Console\Console::getPaths PHP Method

getPaths() public method

Returns an array of strings corresponding to file and directory paths to be traversed.
public getPaths ( ) : array
return array An array of paths
    public function getPaths()
    {
        return $this->paths;
    }

Usage Example

Example #1
0
    require_once $path;
}
// Bootstrap file must be required directly rather than from function
// invocation to preserve any loaded globals
$bootstrap = $console->options['bootstrap'];
if ($bootstrap) {
    if (!file_exists($bootstrap)) {
        $console->writeLn("Bootstrap file not found: {$bootstrap}");
        exit(1);
    } else {
        if (!is_readable($bootstrap)) {
            $console->writeLn("Bootstrap file not readable: {$bootstrap}");
            exit(1);
        } else {
            if (!@(include_once $bootstrap)) {
                $console->writeLn("Unable to include bootstrap: {$bootstrap}");
                exit(1);
            }
        }
    }
}
// Files must be required directly rather than from function
// invocation to preserve any loaded globals
$paths = expandPaths($console->getPaths());
foreach ($paths as $path) {
    require_once $path;
}
// Start the runner
Runner::$console = $console;
Runner::getInstance()->run();
exit($console->getExitStatus());
All Usage Examples Of pho\Console\Console::getPaths