本文整理汇总了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';
}
示例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';
}
示例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'];
}
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例11: __construct
/**
* {@inheritDoc}
*/
public function __construct($model)
{
parent::__construct($model);
$this->markUnknown();
}
示例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;
}
示例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);
}
示例14: __construct
public function __construct()
{
parent::__construct("user");
}
示例15: __construct
/**
* @param string $name
*/
public function __construct($name)
{
parent::__construct($name, null);
}