当前位置: 首页>>代码示例>>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;未经允许,请勿转载。