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


PHP static::fields方法代码示例

本文整理汇总了PHP中static::fields方法的典型用法代码示例。如果您正苦于以下问题:PHP static::fields方法的具体用法?PHP static::fields怎么用?PHP static::fields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在static的用法示例。


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

示例1: fields

 public static function fields($data = array())
 {
     if (empty($data)) {
         return static::$fields;
     } else {
         return static::$fields = $data;
     }
 }
开发者ID:techart,项目名称:tao,代码行数:8,代码来源:Storage.php

示例2: setUp

 /**
  * @inheritdoc
  */
 protected function setUp()
 {
     static::$Redis->flushall();
     static::$fields = ['string' => 'value', 'integer' => 42, 'true' => true, 'false' => false, 'float' => 3.14159265, 'e' => '5.0e3', 'null' => null, '' => 'empty', 'empty' => '', 'bin' => call_user_func_array('pack', ['N*'] + range(0, 255))];
     static::$Redis->hmset('hash', static::$fields);
     static::$Redis->hmset('', static::$fields);
     static::$Redis->set('string', 'value');
 }
开发者ID:cheprasov,项目名称:php-redis-client,代码行数:11,代码来源:HashesCommandsTest.php

示例3: __construct

 public function __construct()
 {
     require_once __DIR__ . '/rb.php';
     if (!static::$tableName) {
         throw new \Exception('未定义表名');
     }
     static::$tableName = $this->fixTableName();
     static::$fields = $this->fixFields();
     static::$many2one = $this->fixMany2One();
 }
开发者ID:dongww,项目名称:simple-db,代码行数:10,代码来源:ManagerAbstract.php

示例4: getInstance

 /**
  * Get class instance
  * @param $neededFields array of fields to set as settings
  * @param $neededDepth int depth to set as settings
  */
 public static function getInstance($neededFields = null, $neededDepth = null)
 {
     if (is_null(self::$instance)) {
         $childclass = get_called_class();
         self::$instance = new $childclass();
     }
     // Set fields if user ask for it
     if (!is_null($neededFields)) {
         static::$fields = isset(static::${$neededFields}) ? static::${$neededFields} : [];
     }
     // Set depth if user ask for it
     if (!is_null($neededDepth)) {
         static::$depth = $neededDepth;
     }
     return self::$instance;
 }
开发者ID:filozofer,项目名称:rootpress,代码行数:21,代码来源:PageRepository.php

示例5: getInstance

 /**
  * Get class instance
  * $instances is an array which contains each instanced child class
  * @param $neededFields array of fields to set as settings
  * @param $neededDepth int depth to set as settings
  */
 public static function getInstance($neededFields = null, $neededDepth = null)
 {
     $childClass = get_called_class();
     if (!isset(self::$instances[$childClass])) {
         self::$instances[$childClass] = new $childClass();
     }
     // Set field if user ask for it
     if (!is_null($neededFields)) {
         if (is_string($neededFields)) {
             static::$fields = isset(static::${$neededFields}) ? static::${$neededFields} : [];
         } else {
             if (is_array($neededFields)) {
                 static::$fields = $neededFields;
             }
         }
     }
     // Set depth if user ask for it
     if (!is_null($neededDepth)) {
         static::$depth = $neededDepth;
     }
     return self::$instances[$childClass];
 }
开发者ID:filozofer,项目名称:rootpress,代码行数:28,代码来源:CRUDTaxonomyRepository.php

示例6:

 function __construct($fields = [])
 {
     static::$fields = [['content', 'Содержание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['subject', 'Тема письма', 1, 'string']];
     parent::__construct($fields);
 }
开发者ID:Makeyko,项目名称:galaxysss,代码行数:5,代码来源:SubscribeHistory.php

示例7:

 function __construct($fields = [])
 {
     static::$fields = [['content', 'Название', 1, 'string']];
     parent::__construct($fields);
 }
开发者ID:Makeyko,项目名称:galaxysss,代码行数:5,代码来源:Form.php

示例8: jsonSerialize

 public function jsonSerialize()
 {
     if (!static::$fields) {
         static::$fields = new Map();
     }
     return static::$fields->jsonSerialize();
 }
开发者ID:caffeina-core,项目名称:core,代码行数:7,代码来源:Dictionary.php

示例9:

 function __construct($fields = [])
 {
     static::$fields = [['name_first', 'Имя', 0, 'string'], ['name_last', 'Фамилия', 0, 'string'], ['name_middle', 'Отчество', 0, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]], ['date_born', 'Дата прихода', 0, 'cs\\Widget\\DatePicker\\Validator', 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', []]], ['date_death', 'Дата ухода', 0, 'cs\\Widget\\DatePicker\\Validator', 'widget' => ['cs\\Widget\\DatePicker\\DatePicker', []]]];
     parent::__construct($fields);
 }
开发者ID:Makeyko,项目名称:galaxysss,代码行数:5,代码来源:UserRod.php

示例10:

 function __construct($fields = [])
 {
     static::$fields = [['header', 'Название', 1, 'string'], ['description', 'Описание краткое', 0, 'string'], ['content', 'Полное описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['parent_id', 'Родительская ветка', 0, 'integer'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]];
     parent::__construct($fields);
 }
开发者ID:Makeyko,项目名称:galaxysss,代码行数:5,代码来源:Category.php

示例11:

 function __construct($fields = [])
 {
     static::$fields = [['content', 'Содержание', 0, 'string'], ['subject', 'Тема письма', 1, 'string']];
     parent::__construct($fields);
 }
开发者ID:Makeyko,项目名称:galaxysss,代码行数:5,代码来源:SubscribeHistorySimple.php

示例12: setFields

 /**
  * Setter for the model's fields array
  *
  * @param array $fields
  */
 public function setFields($fields)
 {
     static::$fields = $fields;
     return $this;
 }
开发者ID:zealproject,项目名称:zeal-orm,代码行数:10,代码来源:AbstractActiveRecord.php

示例13:

 function __construct($fields = [])
 {
     static::$fields = [['isRed', 'Есть красный', 0, 'cs\\Widget\\CheckBox2\\Validator', 'widget' => ['cs\\Widget\\CheckBox2\\CheckBox', []]], ['isBlue', 'Есть синий', 0, 'cs\\Widget\\CheckBox2\\Validator', 'widget' => ['cs\\Widget\\CheckBox2\\CheckBox', []]], ['isGreen', 'Есть курс', 0, 'cs\\Widget\\CheckBox2\\Validator', 'widget' => ['cs\\Widget\\CheckBox2\\CheckBox', []]]];
     parent::__construct($fields);
 }
开发者ID:CAPITALOV,项目名称:capitalov,代码行数:5,代码来源:StockItem3.php

示例14:

 function __construct($fields = [])
 {
     static::$fields = [['monthCounter', 'Количество месяцев', 1, 'integer'], ['stockId', 'Котировка', 0, 'string'], ['finam_em', 'Идентификатор котировки', 0, 'integer']];
     parent::__construct($fields);
 }
开发者ID:CAPITALOV,项目名称:capitalov,代码行数:5,代码来源:CabinetWalletAdd1.php

示例15:

 function __construct($fields = [])
 {
     static::$fields = [['name', 'Название', 1, 'string'], ['content', 'Описание', 0, 'string', 'widget' => ['cs\\Widget\\HtmlContent\\HtmlContent', []]], ['description', 'Описание краткое', 0, 'string'], ['tickets_counter', 'Кол-во билетов в продукте', 0, 'integer'], ['price', 'Цена', 0, 'integer'], ['image', 'Картинка', 0, 'string', 'widget' => [FileUpload::className(), ['options' => ['small' => \app\services\GsssHtml::$formatIcon]]]]];
     parent::__construct($fields);
 }
开发者ID:dram1008,项目名称:bogdan,代码行数:5,代码来源:Product.php


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