<?php require_once __DIR__ . '/library/Application.php'; $loader = new \Nano\Loader(); $args = $_SERVER['argv']; array_shift($args); $result = \Nano\Cli::main($args); if (0 !== $result) { exit($result); }
/** * @return \Nano\Cli\Script * @param $name */ protected function getScript($name) { $result = $this->cli->getScript($name); return $result->newInstance($name, $this->cli); }
public function testRunWrapper() { Nano::setApplication(null); self::assertEquals(0, \Nano\Cli::main(array())); }
/** * @return \ReflectionClass */ protected function getReflector() { return $this->cli->getScript($this->name); }
/** * @return string */ protected function getWindowsScriptSource() { return '@echo off' . PHP_EOL . \Nano\Cli::getPhpBinary() . ' ' . \Nano\Cli::getCliScriptPath() . ' %*'; }