当前位置: 首页>>代码示例>>PHP>>正文


PHP OnApp类代码示例

本文整理汇总了PHP中OnApp的典型用法代码示例。如果您正苦于以下问题:PHP OnApp类的具体用法?PHP OnApp怎么用?PHP OnApp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了OnApp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.0':
         case '2.1':
             $this->fields = array('price_on' => array(ONAPP_FIELD_MAP => '_price_on', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'price_off' => array(ONAPP_FIELD_MAP => '_price_off', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'price' => array(ONAPP_FIELD_MAP => '_price', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true));
             break;
         case 2.2:
         case 2.3:
             $this->fields = $this->initFields(2.1);
             break;
         case 3.0:
         case 3.1:
         case 3.2:
         case 3.3:
         case 3.4:
         case 3.5:
         case 4.0:
         case 4.1:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:jcomack,项目名称:OnApp,代码行数:33,代码来源:Price.php

示例2: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.0':
         case '2.1':
             break;
         case 2.2:
         case 2.3:
             $this->fields = array('price' => array(ONAPP_FIELD_MAP => '_price', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'city' => array(ONAPP_FIELD_MAP => '_city', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'country' => array(ONAPP_FIELD_MAP => '_country', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'aflexi_location_id' => array(ONAPP_FIELD_MAP => '_aflexi_location_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'operator' => array(ONAPP_FIELD_MAP => '_operator', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'edge_group_id' => array(ONAPP_FIELD_MAP => '_edge_group_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true));
             $this->fields = $this->initFields(2.1);
             break;
         case 3.0:
         case 3.1:
         case 3.2:
         case 3.3:
         case 3.4:
         case 3.5:
         case 4.0:
         case 4.1:
             $this->fields = $this->initFields(2.3);
             $this->fields['streamSupported'] = array(ONAPP_FIELD_MAP => '_streamSupported', ONAPP_FIELD_TYPE => 'boolean');
             $this->fields['httpSupported'] = array(ONAPP_FIELD_MAP => '_httpSupported', ONAPP_FIELD_TYPE => 'boolean');
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:jcomack,项目名称:OnApp,代码行数:35,代码来源:Location.php

示例3: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.0':
             $this->fields = array('id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'identifier' => array(ONAPP_FIELD_MAP => '_identifier', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'label' => array(ONAPP_FIELD_MAP => '_label', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_DEFAULT_VALUE => ''), 'price_cpu' => array(ONAPP_FIELD_MAP => '_price_cpu', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_cpu_share' => array(ONAPP_FIELD_MAP => '_price_cpu_share', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_disk_size' => array(ONAPP_FIELD_MAP => '_price_disk_size', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_memory' => array(ONAPP_FIELD_MAP => '_price_memory', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'price_ip_address' => array(ONAPP_FIELD_MAP => '_price_ip_address', ONAPP_FIELD_REQUIRED => 'true'), 'price_storage_disk_size' => array(ONAPP_FIELD_MAP => '_price_storage_disk_size', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_cpu_power_off' => array(ONAPP_FIELD_MAP => '_price_cpu_power_off', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_memory_power_off' => array(ONAPP_FIELD_MAP => '_price_memory_power_off', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_disk_size_power_off' => array(ONAPP_FIELD_MAP => '_price_disk_size_power_off', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_cpu_share_power_off' => array(ONAPP_FIELD_MAP => '_price_cpu_share_power_off', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'), 'price_ip_address_power_off' => array(ONAPP_FIELD_MAP => '_price_ip_address_power_off', ONAPP_FIELD_TYPE => 'decimal', ONAPP_FIELD_REQUIRED => 'true', ONAPP_FIELD_DEFAULT_VALUE => '0.0'));
             break;
         case '2.1':
             $this->fields = array();
             break;
         case 2.2:
         case 2.3:
         case 3.0:
         case 3.1:
         case 3.2:
         case 3.3:
         case 3.4:
         case 3.5:
         case 4.0:
         case 4.1:
             $this->fields = $this->initFields(2.1);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:jcomack,项目名称:OnApp,代码行数:33,代码来源:Group.php

示例4: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('city' => array(ONAPP_FIELD_MAP => '_city', ONAPP_FIELD_TYPE => 'string'), 'region' => array(ONAPP_FIELD_MAP => '_region', ONAPP_FIELD_TYPE => 'string'), 'price' => array(ONAPP_FIELD_MAP => '_price', ONAPP_FIELD_TYPE => 'float'), 'latitude' => array(ONAPP_FIELD_MAP => '_latitude', ONAPP_FIELD_TYPE => 'float'), 'country' => array(ONAPP_FIELD_MAP => '_country', ONAPP_FIELD_TYPE => 'string'), 'deleted' => array(ONAPP_FIELD_MAP => '_deleted', ONAPP_FIELD_TYPE => 'boolean'), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'geoblocking' => array(ONAPP_FIELD_MAP => '_geoblocking', ONAPP_FIELD_TYPE => 'boolean'), 'createdAt' => array(ONAPP_FIELD_MAP => '_createdAt', ONAPP_FIELD_TYPE => 'string'), 'updatedAt' => array(ONAPP_FIELD_MAP => '_updatedAt', ONAPP_FIELD_TYPE => 'integer'), 'description' => array(ONAPP_FIELD_MAP => '_description', ONAPP_FIELD_TYPE => 'string'), 'longitude' => array(ONAPP_FIELD_MAP => '_longitude', ONAPP_FIELD_TYPE => 'float'), 'status' => array(ONAPP_FIELD_MAP => '_status', ONAPP_FIELD_TYPE => 'string'), 'operator' => array(ONAPP_FIELD_MAP => '_operator', ONAPP_FIELD_TYPE => 'array', ONAPP_FIELD_CLASS => 'EdgeGroup_Location_Operator'));
             break;
         case 3.0:
             $this->fields = $this->initFields(2.3);
             break;
         case 3.1:
         case 3.2:
         case 3.3:
         case 3.4:
         case 3.5:
         case 4.0:
         case 4.1:
             $this->fields = $this->initFields(3.0);
             $this->fields['geoBlocking'] = array(ONAPP_FIELD_MAP => 'geoBlocking', ONAPP_FIELD_TYPE => 'boolean');
             $this->fields['onSaleStreamSupported'] = array(ONAPP_FIELD_MAP => 'onSaleStreamSupported', ONAPP_FIELD_TYPE => 'boolean');
             $this->fields['onSaleHttpSupported'] = array(ONAPP_FIELD_MAP => 'onSaleHttpSupported', ONAPP_FIELD_TYPE => 'boolean');
             $this->fields['streamSupported'] = array(ONAPP_FIELD_MAP => 'streamSupported', ONAPP_FIELD_TYPE => 'boolean');
             $this->fields['httpSupported'] = array(ONAPP_FIELD_MAP => 'httpSupported', ONAPP_FIELD_TYPE => 'boolean');
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:jcomack,项目名称:OnApp,代码行数:35,代码来源:Location.php

示例5: getResource

 /**
  * Returns the URL Alias of the API Class that inherits the OnApp class
  *
  * @param string $action action name
  *
  * @return string API resource
  * @access public
  */
 function getResource($action = ONAPP_GETRESOURCE_DEFAULT)
 {
     switch ($action) {
         case ONAPP_GETRESOURCE_LOAD:
             $resource = 'cdn_resources/' . $this->_id . '/' . $this->_resource;
             $this->logger->debug('getResource( ' . $action . ' ): return ' . $resource);
             break;
         default:
             $resource = parent::getResource($action);
             break;
     }
     return $resource;
 }
开发者ID:jcomack,项目名称:OnApp,代码行数:21,代码来源:Instructions.php

示例6: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('name' => array(ONAPP_FIELD_MAP => '_name', ONAPP_FIELD_TYPE => 'string'), 'companyName' => array(ONAPP_FIELD_MAP => '_companyName', ONAPP_FIELD_TYPE => 'string'), 'companyDescription' => array(ONAPP_FIELD_MAP => '_companyDescription', ONAPP_FIELD_TYPE => 'string'), 'statusReason' => array(ONAPP_FIELD_MAP => '_statusReason', ONAPP_FIELD_TYPE => 'string'), 'updatedAt' => array(ONAPP_FIELD_MAP => '_updatedAt', ONAPP_FIELD_TYPE => 'string'), 'username' => array(ONAPP_FIELD_MAP => '_username', ONAPP_FIELD_TYPE => 'string'), 'role' => array(ONAPP_FIELD_MAP => '_role', ONAPP_FIELD_TYPE => 'string'), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer'), 'companyPhone' => array(ONAPP_FIELD_MAP => '_companyPhone', ONAPP_FIELD_TYPE => 'string'), 'principal' => array(ONAPP_FIELD_MAP => '_principal', ONAPP_FIELD_TYPE => 'integer'), 'createdAt' => array(ONAPP_FIELD_MAP => '_createdAt', ONAPP_FIELD_TYPE => 'string'), 'settings' => array(ONAPP_FIELD_MAP => '_settings', ONAPP_FIELD_TYPE => 'array', ONAPP_FIELD_CLASS => 'EdgeGroup_Location_Operator_Setting'), 'status' => array(ONAPP_FIELD_MAP => '_status', ONAPP_FIELD_TYPE => 'string'), 'email' => array(ONAPP_FIELD_MAP => '_email', ONAPP_FIELD_TYPE => 'string'));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:23,代码来源:Operator.php

示例7: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('target_id' => array(ONAPP_FIELD_MAP => '_target_id', ONAPP_FIELD_TYPE => 'integer'), 'not_cached' => array(ONAPP_FIELD_MAP => '_non_cached', ONAPP_FIELD_TYPE => 'float'), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'user_id' => array(ONAPP_FIELD_MAP => '_user_id', ONAPP_FIELD_TYPE => 'integer'), 'cached' => array(ONAPP_FIELD_MAP => '_cached', ONAPP_FIELD_TYPE => 'float'));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:23,代码来源:CDNUsageStatistic.php

示例8: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('logFtpUsername' => array(ONAPP_FIELD_MAP => '_logFtpUsername', ONAPP_FIELD_TYPE => 'string'), 'baseHostname' => array(ONAPP_FIELD_MAP => '_baseHostname', ONAPP_FIELD_TYPE => 'string'), 'sslCertificate' => array(ONAPP_FIELD_MAP => '_sslCertificate', ONAPP_FIELD_TYPE => 'string'), 'trafficPolicy' => array(ONAPP_FIELD_MAP => '_trafficPolicy', ONAPP_FIELD_TYPE => 'string'), 'logDeliveryMethod' => array(ONAPP_FIELD_MAP => '_logDeliveryMethod', ONAPP_FIELD_TYPE => 'string'), 'logFtpPassword' => array(ONAPP_FIELD_MAP => '_logFtpPassword', ONAPP_FIELD_TYPE => 'string'), 'httpCacheExpiry' => array(ONAPP_FIELD_MAP => '_httpCacheExpiry', ONAPP_FIELD_TYPE => 'integer'), 'httpErrorPage' => array(ONAPP_FIELD_MAP => '_httpErrorPage', ONAPP_FIELD_TYPE => 'string'), 'logFtpDirectory' => array(ONAPP_FIELD_MAP => '_logFtpDirectory', ONAPP_FIELD_TYPE => 'string'), 'logFormat' => array(ONAPP_FIELD_MAP => '_logFormat', ONAPP_FIELD_TYPE => 'string'), 'logSyslogHostname' => array(ONAPP_FIELD_MAP => '_logSyslogHostname', ONAPP_FIELD_TYPE => 'string'), 'logFtpHostname' => array(ONAPP_FIELD_MAP => '_logFtpHostname', ONAPP_FIELD_TYPE => 'string'), 'logFtpPort' => array(ONAPP_FIELD_MAP => '_logFtpPort', ONAPP_FIELD_TYPE => 'integer'), 'sslKey' => array(ONAPP_FIELD_MAP => '_sslKey', ONAPP_FIELD_TYPE => 'string'));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:23,代码来源:Setting.php

示例9: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('label' => array(ONAPP_FIELD_MAP => '_label', ONAPP_FIELD_REQUIRED => true, ONAPP_FIELD_DEFAULT_VALUE => ''), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'edge_group_locations' => array(ONAPP_FIELD_MAP => '_edge_group_locations', ONAPP_FIELD_TYPE => 'array', ONAPP_FIELD_CLASS => 'CDNResource_AvailableEdgeGroup_Location'));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:23,代码来源:AvailableEdgeGroup.php

示例10: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.2':
         case '2.3':
             $this->fields = array('for_minutes' => array(ONAPP_FIELD_MAP => '_for_minutes', ONAPP_FIELD_TYPE => 'integer'), 'enabled' => array(ONAPP_FIELD_MAP => '_enabled', ONAPP_FIELD_TYPE => 'boolean'), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'units' => array(ONAPP_FIELD_MAP => '_units', ONAPP_FIELD_TYPE => 'integer'), 'value' => array(ONAPP_FIELD_MAP => '_value', ONAPP_FIELD_TYPE => 'integer'));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:24,代码来源:AutoScaling.php

示例11: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.1':
         case 2.2:
         case 2.3:
             $this->fields = array('id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'datetime', ONAPP_FIELD_READ_ONLY => true), 'arch' => array(ONAPP_FIELD_MAP => '_arch', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true), 'total' => array(ONAPP_FIELD_MAP => '_total', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_REQUIRED => true), 'distro' => array(ONAPP_FIELD_MAP => '_distro', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true), 'count' => array(ONAPP_FIELD_MAP => '_count', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_REQUIRED => true), 'tail' => array(ONAPP_FIELD_MAP => '_tail', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true), 'edition' => array(ONAPP_FIELD_MAP => '_edition', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true), 'license' => array(ONAPP_FIELD_MAP => '_license', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_REQUIRED => true));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:25,代码来源:SoftwareLincense.php

示例12: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.1':
         case 2.2:
         case 2.3:
             $this->fields = array('cluster_id' => array(ONAPP_FIELD_MAP => '_cluster_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'ip_address_id' => array(ONAPP_FIELD_MAP => '_ip_address_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'updated_at' => array(ONAPP_FIELD_MAP => '_updated_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'created_at' => array(ONAPP_FIELD_MAP => '_created_at', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'virtual_machine_id' => array(ONAPP_FIELD_MAP => '_virtual_machine_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:25,代码来源:Node.php

示例13: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.1':
         case 2.2:
         case 2.3:
             $this->fields = array('cpus' => array(ONAPP_FIELD_MAP => '_cpus', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'cpu_shares' => array(ONAPP_FIELD_MAP => '_cpu_shares', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'memory' => array(ONAPP_FIELD_MAP => '_memory', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'rate_limit' => array(ONAPP_FIELD_MAP => '_rate_limit', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:25,代码来源:NodeAtribute.php

示例14: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.1':
         case 2.2:
         case 2.3:
             $this->fields = array('max_node_amount' => array(ONAPP_FIELD_MAP => '_max_node_amount', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'min_node_amount' => array(ONAPP_FIELD_MAP => '_min_node_amount', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:25,代码来源:Config.php

示例15: initFields

 /**
  * API Fields description
  *
  * @param string|float $version   OnApp API version
  * @param string       $className current class' name
  *
  * @return array
  */
 public function initFields($version = null, $className = '')
 {
     switch ($version) {
         case '2.3':
             $this->fields = array('id' => array(ONAPP_FIELD_MAP => '_id', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'name' => array(ONAPP_FIELD_MAP => '_name', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true), 'default_value' => array(ONAPP_FIELD_MAP => '_default_value', ONAPP_FIELD_TYPE => 'integer', ONAPP_FIELD_READ_ONLY => true), 'data_type' => array(ONAPP_FIELD_MAP => '_data_type', ONAPP_FIELD_TYPE => 'string', ONAPP_FIELD_READ_ONLY => true));
             break;
         case 3.0:
         case 3.1:
         case 3.2:
             $this->fields = $this->initFields(2.3);
             break;
         default:
             $this->logger->error('supported only from 2.3 version', __FILE__, __LINE__);
             break;
     }
     parent::initFields($version, __CLASS__);
     return $this->fields;
 }
开发者ID:prado1991,项目名称:OnApp-PHP-Wrapper-External,代码行数:26,代码来源:UserAdditionalField.php


注:本文中的OnApp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。