Exemple #1
0
 public static function cmd_libs()
 {
     \System\Init::basic();
     \Helper\Cli::out("Installed composer libraries");
     \Helper\Cli::sep();
     \Helper\Cli::out_flist(array("list" => \System\Composer::get_libs(), "margin" => 2, "show_keys" => false));
 }
Exemple #2
0
 public function cmd_list()
 {
     \System\Init::basic();
     $list = cfg('assets', 'dependencies');
     if ($this->json) {
         \Helper\Cli::out(json_encode(array("dependencies" => $list), JSON_PRETTY_PRINT));
     } else {
         \Helper\Cli::out('Bower dependencies');
         \Helper\Cli::out_flist(array("list" => $list, "margin" => 2));
     }
 }
Exemple #3
0
 public static function cmd_all()
 {
     \System\Init::basic();
     $all = self::get_all();
     $path = \System\Composer::resolve('/etc/init.d/test.php');
     foreach ($all as $key => $val) {
         $cmd = implode(';', array("cd '" . BASE_DIR . "'", "phpunit --bootstrap '" . $path . "' --colors --test-suffix .php '" . $val . "'"));
         \Helper\Cli::out($val);
         $out = passthru($cmd);
         \Helper\Cli::out();
     }
 }
Exemple #4
0
 /**
  * Build static cache
  *
  * @return void
  */
 public function cmd_static()
 {
     \System\Init::basic();
     $lib_list = \System\Composer::get_libs();
     $libs = array();
     foreach ($lib_list as $lib) {
         $libs[$lib] = $lib;
     }
     array_push($libs, null);
     \Helper\Cli::do_over($libs, function ($key, $name) {
         \System\Cache::build_static_for($name);
     }, 'Collecting static files');
 }
Exemple #5
0
 private function database_create()
 {
     \System\Init::basic();
     if (!self::database_exists()) {
         $db_ident = cfg('database', 'default');
         $name = cfg('database', 'list', $db_ident, 'database');
         $cmd = "echo \"CREATE DATABASE " . $name . "\" | " . self::assemble_mysql_command("mysql", false);
         \Helper\Cli::out("Creating database '" . $name . "'");
         shell_exec($cmd);
     }
     return $this;
 }