本文整理汇总了PHP中parent::properties方法的典型用法代码示例。如果您正苦于以下问题:PHP parent::properties方法的具体用法?PHP parent::properties怎么用?PHP parent::properties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parent
的用法示例。
在下文中一共展示了parent::properties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: version
/**
* Check the version of the given property in the User-Agent.
*
* @inherit
*/
public function version($propertyName, $type = self::VERSION_TYPE_STRING)
{
$check = key(static::$additionalProperties);
// Check if the additional properties have been added already
if (!array_key_exists($check, parent::$properties)) {
parent::$properties = array_merge(parent::$properties, static::$additionalProperties);
}
return parent::version($propertyName, $type);
}
示例2: version
/**
* Check the version of the given property in the User-Agent.
*
* @inherit
*/
public function version($propertyName, $type = self::VERSION_TYPE_STRING)
{
$check = key(static::$additionalProperties);
// Check if the additional properties have been added already
if (!array_key_exists($check, parent::$properties)) {
// TODO: why is mergeRules not working here?
parent::$properties = array_merge(parent::$properties, static::$additionalProperties, $this->getConfigRules(['properties']));
}
return parent::version($propertyName, $type);
}