all() публичный статический Метод

public static all ( )
Пример #1
0
 public function execute()
 {
     $apps = AppStore::all();
     foreach ($apps as $name => $opt) {
         $this->logger->writeln(sprintf('% -8s - %s', $name, $opt['url']));
     }
 }
Пример #2
0
 public function execute($appName)
 {
     $apps = AppStore::all();
     if (!isset($apps[$appName])) {
         throw new Exception("App {$appName} not found.");
     }
     $app = $apps[$appName];
     $targetDir = Config::getRoot() . DIRECTORY_SEPARATOR . 'bin';
     $target = $targetDir . DIRECTORY_SEPARATOR . $app['as'];
     DownloadFactory::getInstance($this->logger, $this->options)->download($app['url'], $target);
     $this->logger->info('Changing permissions to 0755');
     if ($mod = $this->options->chmod) {
         chmod($target, octdec($mod));
     } else {
         chmod($target, 0755);
     }
     $this->logger->info("Downloaded at {$target}");
 }