當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Scalr_UI_Controller類代碼示例

本文整理匯總了PHP中Scalr_UI_Controller的典型用法代碼示例。如果您正苦於以下問題:PHP Scalr_UI_Controller類的具體用法?PHP Scalr_UI_Controller怎麽用?PHP Scalr_UI_Controller使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Scalr_UI_Controller類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_OPENSTACK_VOLUMES);
 }
開發者ID:sacredwebsite,項目名稱:scalr,代碼行數:8,代碼來源:Volumes.php

示例2: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ADMINISTRATION_SCRIPTS);
 }
開發者ID:sacredwebsite,項目名稱:scalr,代碼行數:8,代碼來源:Shortcuts.php

示例3: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed([Acl::RESOURCE_FARMS, Acl::RESOURCE_TEAM_FARMS, Acl::RESOURCE_OWN_FARMS], Acl::PERM_FARMS_STATISTICS);
 }
開發者ID:scalr,項目名稱:scalr,代碼行數:8,代碼來源:Monitoring.php

示例4: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_FARMS_ROLES);
 }
開發者ID:sacredwebsite,項目名稱:scalr,代碼行數:8,代碼來源:Roles.php

示例5: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DISCOVERY_SERVERS) && $this->request->isAllowed(Acl::RESOURCE_DISCOVERY_SERVERS, Acl::PERM_DISCOVERY_SERVERS_IMPORT);
 }
開發者ID:scalr,項目名稱:scalr,代碼行數:8,代碼來源:Import.php

示例6: internalRequest

 /**
  * Get internal request to the controller's action ignoring checking aliases
  *
  * @param   string   $uri
  * @param   array    $parameters
  * @return  mixed    Returns raw response as it is returned by action
  */
 protected function internalRequest($uri, array $parameters = array())
 {
     $aUri = parse_url($uri);
     call_user_func_array(array($this, 'getRequest'), array_merge(array(Scalr_UI_Request::REQUEST_TYPE_UI, null), func_get_args()));
     $path = explode('/', trim($aUri['path'], '/'));
     $method = array_pop($path) . 'Action';
     $subController = ucfirst(array_pop($path));
     $controller = 'Scalr_UI_Controller' . (count($path) ? '_' . join('_', array_map('ucfirst', $path)) : '');
     $c = \Scalr_UI_Controller::loadController($subController, $controller, true);
     $c->{$method}();
     // TODO: use $c->callActionMethod($method);
     $content = Scalr_UI_Response::getInstance()->getResponse();
     $arr = @json_decode($content, true);
     return $arr === null ? $content : $arr;
 }
開發者ID:rickb838,項目名稱:scalr,代碼行數:22,代碼來源:WebTestCase.php

示例7: checkLifeCycle

 public function checkLifeCycle($widgets)
 {
     $result = array();
     foreach ($widgets as $id => $object) {
         $name = str_replace('dashboard.', '', $object['name']);
         try {
             $widget = Scalr_UI_Controller::loadController($name, 'Scalr_UI_Controller_Dashboard_Widget');
         } catch (Exception $e) {
             continue;
         }
         try {
             $result[$id]['widgetContent'] = $widget->getContent($object['params']);
         } catch (ADODB_Exception $e) {
             \Scalr::logException($e);
             $result[$id]['widgetError'] = 'Database error';
         } catch (Exception $e) {
             $result[$id]['widgetError'] = $e->getMessage();
         }
     }
     return $result;
 }
開發者ID:sacredwebsite,項目名稱:scalr,代碼行數:21,代碼來源:Dashboard.php

示例8: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_GCE_PERSISTENT_DISKS);
 }
開發者ID:scalr,項目名稱:scalr,代碼行數:8,代碼來源:Disks.php

示例9: hasAccess

 /**
  * {@inheritdoc}
  * @see Scalr_UI_Controller::hasAccess()
  */
 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ANALYTICS_ENVIRONMENT);
 }
開發者ID:mheydt,項目名稱:scalr,代碼行數:8,代碼來源:Farms.php

示例10: hasAccess

 public function hasAccess()
 {
     $enabledPlatforms = $this->getEnvironment()->getEnabledPlatforms();
     if (!in_array(SERVER_PLATFORMS::AZURE, $enabledPlatforms)) {
         throw new Exception('You need to enable Azure platform for current environment');
     }
     return parent::hasAccess();
 }
開發者ID:mheydt,項目名稱:scalr,代碼行數:8,代碼來源:Azure.php

示例11: hasAccess

 public function hasAccess()
 {
     if (parent::hasAccess()) {
         return $this->user->getType() == Scalr_Account_User::TYPE_ACCOUNT_OWNER || $this->user->isTeamOwner() ? true : false;
     } else {
         return false;
     }
 }
開發者ID:rakesh-mohanta,項目名稱:scalr,代碼行數:8,代碼來源:Environments.php

示例12: hasAccess

 public function hasAccess()
 {
     if (!parent::hasAccess() || !$this->request->isAllowed(Acl::RESOURCE_AWS_RDS)) {
         return false;
     }
     if (!in_array(SERVER_PLATFORMS::EC2, $this->getEnvironment()->getEnabledPlatforms())) {
         throw new Exception("You need to enable RDS platform for current environment");
     }
     return true;
 }
開發者ID:sacredwebsite,項目名稱:scalr,代碼行數:10,代碼來源:Rds.php

示例13: hasAccess

 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_ENVADMINISTRATION_GOVERNANCE);
 }
開發者ID:rickb838,項目名稱:scalr,代碼行數:4,代碼來源:Governance.php

示例14: hasAccess

 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_DEPLOYMENTS_SOURCES);
 }
開發者ID:mheydt,項目名稱:scalr,代碼行數:4,代碼來源:Sources.php

示例15: hasAccess

 public function hasAccess()
 {
     return parent::hasAccess() && $this->request->isAllowed(Acl::RESOURCE_SECURITY_SSH_KEYS);
 }
開發者ID:mheydt,項目名稱:scalr,代碼行數:4,代碼來源:Sshkeys.php


注:本文中的Scalr_UI_Controller類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。