本文整理汇总了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);
}
示例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)));
}
示例3: __constrtuct
public function __constrtuct()
{
parent::__construct("sqlite:" . dirname(__FILE__) . "/test.db");
}
示例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');
}
示例5: __construct
public function __construct($table)
{
parent::__construct($table);
$this->engine('INNODB');
$this->charset("UTF8");
}
示例6: __construct
public function __construct()
{
parent::__construct("sqlite:test-get.db");
$this->register_resultset("TestTable");
}
示例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);
}
示例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');
}
示例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();
}