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


PHP Schema::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Constructor.
  *
  * @param Base $validator  Initial validator
  * @param integer         $count      The number of times to replicate the validator
  * @param array           $options    An array of options
  * @param array           $messages   An array of error messages
  *
  * @see Base
  */
 public function __construct(Base $validator, $count, $options = array(), $messages = array())
 {
     $fields = array();
     for ($i = 0; $i < $count; $i++) {
         $fields[$i] = clone $validator;
     }
     parent::__construct($fields, $options, $messages);
 }
开发者ID:rande,项目名称:sfFormBundle,代码行数:18,代码来源:SchemaForEach.php

示例2: isset

 function __construct($config)
 {
     parent::__construct($config);
     $max = isset($config['size']) ? $config['size'] : 100;
     $this->_schema = array("type" => "object", "description" => "Request a slice of the final data set.", "properties" => array("limit" => array("type" => "number", "description" => "The number of items to fetch.", "default" => 20, "minimum" => 1, "maximum" => $max), "offset" => array("type" => "number", "description" => "Start with this item. 0-based.", "default" => 0, "minimum" => 0), "pageNumber" => array("type" => "number", "description" => "The page", "default" => 1, "minimum" => 1), "pageSize" => array("description" => "The number of items to fetch per page.", "default" => $max, "minimum" => 1)));
 }
开发者ID:ifwe,项目名称:TaggedRest,代码行数:6,代码来源:Pagination.php

示例3: __constrtuct

 public function __constrtuct()
 {
     parent::__construct("sqlite:" . dirname(__FILE__) . "/test.db");
 }
开发者ID:Altreus,项目名称:phpdbic,代码行数:4,代码来源:testschema.class.php

示例4: __construct

 /**
  * __construct
  * 
  * Defaults rules that ought to be validated to be server side.
  * 
  * @access public
  * @param  string $path
  * @return void
  */
 public function __construct($path)
 {
     parent::__construct($path);
     $this->setMethod('getServerRules');
 }
开发者ID:ricick,项目名称:PHP-JSON-Validation,代码行数:14,代码来源:SmartSchema.class.php

示例5: __construct

 public function __construct($table)
 {
     parent::__construct($table);
     $this->engine('INNODB');
     $this->charset("UTF8");
 }
开发者ID:leon723,项目名称:chestnut,代码行数:6,代码来源:MysqlSchema.php

示例6: __construct

 public function __construct()
 {
     parent::__construct("sqlite:test-get.db");
     $this->register_resultset("TestTable");
 }
开发者ID:Altreus,项目名称:phpdbic,代码行数:5,代码来源:get.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param string          $field      The field name
  * @param Base $validator  The validator
  * @param array           $options    An array of options
  * @param array           $messages   An array of error messages
  *
  * @see Base
  */
 public function __construct($field, Base $validator, $options = array(), $messages = array())
 {
     $this->addOption('field', $field);
     $this->addOption('validator', $validator);
     parent::__construct(null, $options, $messages);
 }
开发者ID:rande,项目名称:sfFormBundle,代码行数:16,代码来源:SchemaFilter.php

示例8: __construct

 /**
  * Class constructor method
  *
  * @param string $name           Column name
  * @param string $type           Column data-type
  * @param int    $constraint     Column data-type constraint
  * @param bool   $unsigned       Whether or not column is unsigned
  * @param bool   $null           Whether or not column is nullable
  * @param string $default        Column default value
  * @param bool   $auto_increment Whether or not columns should auto-increment
  * @param string $comment        Column comment
  */
 public function __construct($name, $type, $constraint = 0, $unsigned = FALSE, $null = FALSE, $default = '', $auto_increment = FALSE, $comment = '')
 {
     parent::__construct();
     $this->_name = $name;
     $this->_type = $type;
     $this->_constraint = $constraint;
     $this->_unsigned = $unsigned;
     $this->_null = $null;
     $this->_default = $default;
     $this->_auto_increment = $auto_increment;
     $this->_comment = $comment;
     log_message('info', __CLASS__ . ' Class Initialized');
 }
开发者ID:versalle88,项目名称:CodeIgniter-Schema-Library,代码行数:25,代码来源:Schema.php

示例9: __construct

 /**
  * Constructor.
  *
  * @param sfWidgetFormSchema $widget     A sfWidgetFormSchema instance
  * @param string             $decorator  A decorator string
  *
  * @see sfWidgetFormSchema
  */
 public function __construct(Schema $widget, $decorator)
 {
     $this->widget = $widget;
     $this->decorator = $decorator;
     parent::__construct();
 }
开发者ID:rande,项目名称:sfFormBundle,代码行数:14,代码来源:SchemaDecorator.php


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