/** * Main console runner * * @return stream */ public static function execute() { self::out(I18n::translate('command_hello', Juriya::version()) . "\n"); self::processArguments($_SERVER['argv']); self::out(); }
/** * Proxy to Juriya executor * * @return object Juriya\Output */ public function execute() { $this->notify($this); return Juriya::getInstance()->execute($this); }
public function testGetPackages() { Juriya::reset(); $launcher = new Juriya(); $launcher->registerPearPackage('PHP', TRUE); $packages = $launcher->getPackages(); $this->assertNotEmpty($packages); }
/** * I18n instantiation * * @param array I18n configuration * @throws object RuntimeException */ public function __construct($locale = '') { // Main I18n instance only instantiated once if (is_null(static::$instance) && Juriya::getInstance() instanceof Juriya) { empty($locale) or self::setLocale($locale); $this->lang = new Collection(array_fill_keys(array_keys(self::$iso), NULL)); $this->getDefaultLocale(); static::$instance = $this; } else { throw new \RuntimeException(self::translate('class_already_initialized', __CLASS__)); } }
<?php require_once realpath(__DIR__ . '/../Juriya.php'); use Juriya\Juriya; Juriya::registerAutoloader(); Juriya::reset(); $launcher = new Juriya(); $launcher->setEnvironment('test');