本文整理汇总了PHP中RequiredFields::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP RequiredFields::__construct方法的具体用法?PHP RequiredFields::__construct怎么用?PHP RequiredFields::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RequiredFields
的用法示例。
在下文中一共展示了RequiredFields::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param MemberProfileField[] $fields
* @param Member $member
*/
public function __construct($fields, $member = null)
{
parent::__construct();
$this->fields = $fields;
$this->member = $member;
foreach ($this->fields as $field) {
if ($field->Required) {
$this->addRequiredField($field->MemberField);
}
if ($field->Unique) {
$this->unique[] = $field->MemberField;
}
}
if ($member && $member->ID && $member->Password) {
$this->removeRequiredField('Password');
}
}
示例2: __construct
/**
* Constructor
*/
public function __construct()
{
$required = func_get_args();
if (isset($required[0]) && is_array($required[0])) {
$required = $required[0];
}
$required = array_merge($required, $this->customRequired);
parent::__construct($required);
}
示例3: __construct
/**
* Pass required and unique fields as arrays.
*
* Example:
* new RequiredUniqueFields(
* $required = array(
* "FirstName",
* "Surname",
* "Email"
* ), $unique = array(
* "Email" => _t('Member.EMAILEXISTS', 'Member.EMAILEXISTS')
* ), $objectClass = 'Member'
* )
*
* @param array $required
* @param array $unique
* @param string $objectClass
*/
public function __construct($required = array(), $unique = array(), $objectClass = null)
{
$this->unique = $unique;
$this->objectClass = $objectClass;
parent::__construct($required);
}
示例4:
function __construct($array)
{
parent::__construct($array);
}
示例5: __construct
/**
* Constructor
*/
public function __construct()
{
$required = func_get_args();
if (isset($required[0]) && is_array($required[0])) {
$required = $required[0];
}
$required = array_merge($required, $this->customRequired);
// check for config API values and merge them in
$config = $this->config()->customRequired;
if (is_array($config)) {
$required = array_merge($required, $config);
}
parent::__construct(array_unique($required));
}
示例6: __construct
public function __construct(CheckoutComponentConfig $config)
{
$this->config = $config;
parent::__construct($this->config->getRequiredFields());
}
示例7:
function __construct($currentID, $array)
{
$this->currentID = $currentID;
parent::__construct($array);
}