當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Property::__construct方法代碼示例

本文整理匯總了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;
 }
開發者ID:joksnet,項目名稱:php-old,代碼行數:8,代碼來源:PropertyBoolean.php

示例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);
     }
 }
開發者ID:joksnet,項目名稱:php-old,代碼行數:9,代碼來源:PropertyDate.php

示例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;
 }
開發者ID:joksnet,項目名稱:php-old,代碼行數:11,代碼來源:PropertyRelation.php

示例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;
 }
開發者ID:joksnet,項目名稱:php-old,代碼行數:15,代碼來源:PropertyInteger.php

示例5: __construct

 public function __construct($varName)
 {
     $this->visibility = false;
     $this->isStatic = false;
     parent::__construct($varName);
 }
開發者ID:RapotOR,項目名稱:PhpCoder,代碼行數:6,代碼來源:Input.php

示例6: __construct

 /**
  * Constructor
  * @param mixed $data
  * @param string $encoding
  */
 public function __construct($data = null, $encoding = 'UTF-8')
 {
     $this->encoding = $encoding;
     parent::__construct($data);
 }
開發者ID:perryflynn,項目名稱:PerrysLambda,代碼行數:10,代碼來源:StringProperty.php

示例7: __construct

	public function __construct($name, $options)
	{
		parent::__construct($name);
		$this->_options = $options;
	}
開發者ID:nathansamson,項目名稱:CoOrg,代碼行數:5,代碼來源:enum.class.php

示例8: __construct

	public function __construct($name)
	{
		parent::__construct($name);
		$this->_value = array();
	}
開發者ID:nathansamson,項目名稱:CoOrg,代碼行數:5,代碼來源:stringlist.class.php

示例9: __construct

 public function __construct($name, $type, $size, $autoIncrement)
 {
     parent::__construct($name, $type, $size);
     $this->autoIncrement = $autoIncrement;
 }
開發者ID:aeberh,項目名稱:php-movico,代碼行數:5,代碼來源:PrimaryKeyProperty.php

示例10: __construct

	public function __construct($name, $max = null)
	{
		parent::__construct($name);
		$this->_maxInt = $max;
	}
開發者ID:nathansamson,項目名稱:CoOrg,代碼行數:5,代碼來源:integer.class.php

示例11: __construct

 public function __construct()
 {
     parent::__construct();
     $this->length = 8;
     $this->extras = 'AUTO_INCREMENT PRIMARY KEY';
 }
開發者ID:joksnet,項目名稱:php-old,代碼行數:6,代碼來源:PropertyIdentifier.php

示例12: __construct

	public function __construct($name, $maxLength = -1)
	{
		parent::__construct($name);
		$this->_maxLength = $maxLength;
	}
開發者ID:nathansamson,項目名稱:CoOrg,代碼行數:5,代碼來源:string.class.php

示例13: __construct

	public function __construct($name, $dataPath)
	{
		parent::__construct($name);
		$this->_dataPath = $dataPath;
	}
開發者ID:nathansamson,項目名稱:CoOrg,代碼行數:5,代碼來源:file.class.php


注:本文中的Property::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。