本文整理汇总了PHP中Attribute::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Attribute::__construct方法的具体用法?PHP Attribute::__construct怎么用?PHP Attribute::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attribute
的用法示例。
在下文中一共展示了Attribute::__construct方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $values, $server_id, $source = null)
{
# Call our parent constructor
parent::__construct($name, $values, $server_id, $source);
# Our values are set by parent(). If we do have values, and the source was XML, move them to our selection.
if ($this->source == 'XML' && $this->values) {
$this->selection = $this->values;
$this->values = array();
}
if (isset($values['type']) && $values['type'] == 'multiselect') {
$this->multiple = true;
} else {
$this->multiple = false;
}
}
示例2: __construct
public function __construct($value = null, $AttributeType = null)
{
parent::__construct();
$this->value = $value;
$this->AttributeType = $AttributeType;
}
示例3: __construct
public function __construct($value = NULL, $AttributeType = NULL)
{
if (get_parent_class('AdSpecListAttribute')) {
parent::__construct();
}
$this->value = $value;
$this->AttributeType = $AttributeType;
}
示例4: __construct
public function __construct($name, $values, $server_id, $source = null)
{
parent::__construct($name, $values, $server_id, $source);
$this->filepaths = array();
$this->filenames = array();
}
示例5: createStaticQuery
function __construct($attrId, $optionId)
{
$attrId = Attribute::toID($attrId);
$optionId = ProductOption::toID($optionId);
parent::__construct($attrId);
static $q = null;
createStaticQuery($q, "\r\n\t\t\tSELECT attribute_value\r\n\t\t\tFROM cf_product_options_attributes\r\n\t\t\tWHERE product_option_id=:optionId AND attribute_id=:attrId\r\n\t\t");
$q->setParam('optionId', $optionId);
$q->setParam('attrId', $attrId);
$q->execute();
if ($q->fetch()) {
$this->setValue($q->at('attribute_value'));
}
$q->close();
}
示例6: __construct
/**
* TextAttribute constructor.
*
* @param string $name
* @param string $type
* @param array $flags
*/
public function __construct($name = '', $type = 'text', $flags = [])
{
$this->flags = $flags;
parent::__construct($name, $flags);
}