コード例 #1
0
ファイル: DataProviderUtils.php プロジェクト: vberzsin/2014
 public static function getInstance()
 {
     if (null == self::$instance) {
         self::$instance = new DataProviderUtils();
     }
     return self::$instance;
 }
コード例 #2
0
ファイル: ScreenUtils.php プロジェクト: vberzsin/2014
 public function __construct()
 {
     $this->session = Session::getInstance();
     $this->log = Log::getInstance();
     $this->user = User::getInstance();
     $this->storage = Storage::getInstance();
     $this->webDBUtils = WebDBUtils::getInstance();
     $this->dpUtils = DataProviderUtils::getInstance();
     $this->screen = false;
     $this->availableFeatures = false;
 }
コード例 #3
0
ファイル: index.php プロジェクト: vberzsin/2014
     $model['assets'] = $adminUtils->loadSongsByUserId($id);
     $model['roles'] = $userRoles;
     $model['all_roles'] = $allRoles;
     $model['diff_roles'] = $diffRoles;
     $model['screens'] = $screenUtils->listScreens();
     $res = $screenUtils->getScreenById($rid);
     $model['radio'] = $screenUtils->getName();
     // renders view
     $app->render('admin-user.php', $model);
     return;
     break;
 case 'edit-radioscreen':
     $utils = Utils::getInstance();
     $screenUtils = ScreenUtils::getInstance();
     $radioUtils = RadioUtils::getInstance();
     $dpUtils = DataProviderUtils::getInstance();
     $model = $utils->getModel($app);
     if ('all' == $id) {
         $model['radios'] = $radioUtils->listRadios();
         $app->render('admin-radioscreen-all.php', $model);
         return;
     }
     $radioUtils->getRadioById($id);
     $model['rid'] = $id;
     $model['config'] = $screenUtils->getConfig($id);
     if (false == $model['config']) {
         $session->addError('No config for screen: ' . $id);
         $model['radios'] = $radioUtils->listRadios();
         $app->render('admin-radioscreen-all.php', $model);
         return;
     }