Exemplo n.º 1
0
Arquivo: cli.php Projeto: visor/nano
<?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);
}
Exemplo n.º 2
0
 /**
  * @return \Nano\Cli\Script
  * @param $name
  */
 protected function getScript($name)
 {
     $result = $this->cli->getScript($name);
     return $result->newInstance($name, $this->cli);
 }
Exemplo n.º 3
0
 public function testRunWrapper()
 {
     Nano::setApplication(null);
     self::assertEquals(0, \Nano\Cli::main(array()));
 }
Exemplo n.º 4
0
 /**
  * @return \ReflectionClass
  */
 protected function getReflector()
 {
     return $this->cli->getScript($this->name);
 }
Exemplo n.º 5
0
 /**
  * @return string
  */
 protected function getWindowsScriptSource()
 {
     return '@echo off' . PHP_EOL . \Nano\Cli::getPhpBinary() . ' ' . \Nano\Cli::getCliScriptPath() . ' %*';
 }