Example #1
0
 /**
  * Main console runner
  *
  * @return stream
  */
 public static function execute()
 {
     self::out(I18n::translate('command_hello', Juriya::version()) . "\n");
     self::processArguments($_SERVER['argv']);
     self::out();
 }
Example #2
0
 /**
  * Proxy to Juriya executor
  *
  * @return  object  Juriya\Output
  */
 public function execute()
 {
     $this->notify($this);
     return Juriya::getInstance()->execute($this);
 }
Example #3
0
 public function testGetPackages()
 {
     Juriya::reset();
     $launcher = new Juriya();
     $launcher->registerPearPackage('PHP', TRUE);
     $packages = $launcher->getPackages();
     $this->assertNotEmpty($packages);
 }
Example #4
0
 /**
  * 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__));
     }
 }
Example #5
0
<?php

require_once realpath(__DIR__ . '/../Juriya.php');
use Juriya\Juriya;
Juriya::registerAutoloader();
Juriya::reset();
$launcher = new Juriya();
$launcher->setEnvironment('test');