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


PHP Generic::__construct方法代碼示例

本文整理匯總了PHP中Generic::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Generic::__construct方法的具體用法?PHP Generic::__construct怎麽用?PHP Generic::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Generic的用法示例。


在下文中一共展示了Generic::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     if (array_key_exists('label', $data)) {
         $this->label = $data['label'];
     }
     $this->type = 'checkbox';
 }
開發者ID:peehaa,項目名稱:pitchblade,代碼行數:14,代碼來源:Checkbox.php

示例2: __construct

 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     if (array_key_exists('placeholder', $data)) {
         $this->placeholder = $data['placeholder'];
     }
     $this->type = 'text';
 }
開發者ID:peehaa,項目名稱:pitchblade,代碼行數:14,代碼來源:Text.php

示例3: __construct

 /**
  * Create instance
  *
  * @param string $name The name of the field
  * @param array  $data The data to construct the field
  */
 public function __construct($name, array $data)
 {
     parent::__construct($name, $data);
     $this->type = 'multi-select-bucket';
     if (array_key_exists('options', $data)) {
         $this->options = $data['options'];
     }
 }
開發者ID:peehaa,項目名稱:pitchblade,代碼行數:14,代碼來源:MultiSelectBucket.php

示例4: array

 function __construct($subclass_attributes = array())
 {
     $attributes = array("action" => "", "entityname" => "", "modulename" => "", "modifier" => "", "id" => "", "successurl" => "", "failureurl" => "");
     # merge the attibutes of the parent and the subclass
     $newattributes = array_merge($attributes, $subclass_attributes);
     # load the attributes by calling the parent constructor. This is to prevent changing
     # attributes at run time
     parent::__construct($newattributes);
 }
開發者ID:nwtug,項目名稱:academia,代碼行數:9,代碼來源:Controller.php

示例5: array

 function __construct($newattributes = array())
 {
     if (!function_exists('get_instance')) {
         return "Can't get CI instance";
     }
     $this->CI =& get_instance();
     # load the attributes by calling the parent constructor. This is to prevent changing
     # attributes at run time
     parent::__construct($newattributes);
     # the database connection object
     $this->CI->load->library('kernel/database');
     $this->db = $this->CI->database;
 }
開發者ID:nwtug,項目名稱:academia,代碼行數:13,代碼來源:Genericentity.php

示例6: __construct

 /**
  * @param string $Name
  * @param string $Default
  * @param integer $MaximumLength
  */
 public function __construct($name, $default = null, $maximumLength = null){
     parent::__construct($name, $default);
     $this->maximumLength = (\is_null($maximumLength)) ? null : (int)$maximumLength;
 }
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:9,代碼來源:String.php

示例7: __construct

	/**
	 * @param string $Name
	 * @param integer $Default
	 * @param integer $Minimum
	 * @param integer $Maximum
	 */
	public function __construct($name, $default = null, $minimum = null, $maximum = null){
		parent::__construct($name, $default);
		$this->minimum = (\is_null($minimum))? null : (int)$minimum;
		$this->maximum = (\is_null($maximum))? null : (int)$maximum;
	}
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:11,代碼來源:Integer.php

示例8: __construct

 /**
  * @param type $name
  * @param type $type
  * @param type $default 
  */
 public function __construct($name, $type = \MongoBinData::BYTE_ARRAY, $default = null)
 {
     $this->type = $type;
     parent::__construct($name, $default);
 }
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:10,代碼來源:BinaryData.php

示例9: __construct

	/**
	 * @param string $name
	 * @param boolean $default
	 */
	public function __construct($name, $default = null){
		if (!\is_null($default)) {
			$default = (boolean)$default;
		}
		parent::__construct($name, $default);
	}
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:10,代碼來源:Boolean.php

示例10: __construct

 /**
  * creates a connector with given credentials
  *
  * @param string $email
  * @param string $password
  * @param string $answer
  * @param string $platform
  */
 public function __construct($email, $password, $answer, $platform, $security_code)
 {
     parent::__construct($email, $password, $answer, $platform, $security_code);
 }
開發者ID:pascal08,項目名稱:Fifa-15-Ultimate-Team-WebApp-Api,代碼行數:12,代碼來源:Mobile.php

示例11: __construct

 /**
  * {@inheritDoc}
  */
 public function __construct($model)
 {
     parent::__construct($model);
     $this->markUnknown();
 }
開發者ID:stan5621,項目名稱:eduwind,代碼行數:8,代碼來源:BaseGetStatus.php

示例12: __construct

 /**
  * Open a directory.
  *
  * @access  public
  * @param   string  $streamName    Stream name.
  * @param   string  $mode          Open mode, see the self::MODE* constants.
  * @param   string  $context       Context ID (please, see the
  *                                 \Hoa\Stream\Context class).
  * @param   bool    $wait          Differ opening or not.
  * @return  void
  */
 public function __construct($streamName, $mode = self::MODE_READ, $context = null, $wait = false)
 {
     $this->setMode($mode);
     parent::__construct($streamName, $context, $wait);
     return;
 }
開發者ID:Hywan,項目名稱:File,代碼行數:17,代碼來源:Directory.php

示例13: __construct

 /**
  *
  * @param string $name
  * @param string $type the classname this property should hold
  * @param $default
  * @return Morph_Property_hasOne
  */
 public function __construct($name, $type, \morph\Object $default = null)
 {
     $this->type = $type;
     $this->isPermissableType($default);
     parent::__construct($name, $default);
 }
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:13,代碼來源:HasOne.php

示例14: __construct

 public function __construct()
 {
     parent::__construct("user");
 }
開發者ID:tmaski45,項目名稱:tedmatuszewski.com,代碼行數:4,代碼來源:UserService.php

示例15: __construct

	/**
	 * @param string $name
	 */
	public function __construct($name)
	{
		parent::__construct($name, null);
	}
開發者ID:rickyrobinett,項目名稱:morph,代碼行數:7,代碼來源:Regex.php


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