Example #1
0
 protected function getApp()
 {
     $apps = Application::applications();
     foreach ($apps as $key => $obj) {
         $this->_print('[' . $key . '] ' . $obj->_title);
     }
     $app = $this->fetchOption();
     if (isset($apps[$app])) {
         $app = $apps[$app];
     } else {
         $this->_print('Invalid Selection!');
         $app = $this->getApp();
     }
     return $app;
 }