本文整理汇总了PHP中Property::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::__construct方法的具体用法?PHP Property::__construct怎么用?PHP Property::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::__construct方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($default = false)
{
parent::__construct();
if (!is_bool($default)) {
throw new Exception('Property default must be boolean.');
}
$this->default = $default;
}
示例2: __construct
public function __construct($autoUpdate = false, $autoInsert = false)
{
parent::__construct();
$this->autoUpdate = $autoUpdate;
$this->autoInsert = $autoInsert;
if ($this->autoUpdate) {
$this->default = date(self::FORMAT);
}
}
示例3: __construct
public function __construct($relation)
{
parent::__construct();
if (!is_string($relation)) {
throw new Exception('Relation must be the Model class name.');
} elseif (!class_exists($relation)) {
include_once 'application/models/' . str_replace('_', '/', $relation) . '.php';
}
$this->relation = $relation;
$this->length = 8;
}
示例4: __construct
public function __construct($length, $default = 0)
{
parent::__construct();
if (!is_integer($length)) {
throw new Exception('Property length must be integer.');
}
if (0 >= $length) {
throw new Exception('Property length must be grater than zero.');
}
if (!is_integer($default)) {
throw new Exception('Property default must be integer.');
}
$this->length = $length;
$this->default = $default;
}
示例5: __construct
public function __construct($varName)
{
$this->visibility = false;
$this->isStatic = false;
parent::__construct($varName);
}
示例6: __construct
/**
* Constructor
* @param mixed $data
* @param string $encoding
*/
public function __construct($data = null, $encoding = 'UTF-8')
{
$this->encoding = $encoding;
parent::__construct($data);
}
示例7: __construct
public function __construct($name, $options)
{
parent::__construct($name);
$this->_options = $options;
}
示例8: __construct
public function __construct($name)
{
parent::__construct($name);
$this->_value = array();
}
示例9: __construct
public function __construct($name, $type, $size, $autoIncrement)
{
parent::__construct($name, $type, $size);
$this->autoIncrement = $autoIncrement;
}
示例10: __construct
public function __construct($name, $max = null)
{
parent::__construct($name);
$this->_maxInt = $max;
}
示例11: __construct
public function __construct()
{
parent::__construct();
$this->length = 8;
$this->extras = 'AUTO_INCREMENT PRIMARY KEY';
}
示例12: __construct
public function __construct($name, $maxLength = -1)
{
parent::__construct($name);
$this->_maxLength = $maxLength;
}
示例13: __construct
public function __construct($name, $dataPath)
{
parent::__construct($name);
$this->_dataPath = $dataPath;
}