本文整理汇总了PHP中Style::get_font_size方法的典型用法代码示例。如果您正苦于以下问题:PHP Style::get_font_size方法的具体用法?PHP Style::get_font_size怎么用?PHP Style::get_font_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Style
的用法示例。
在下文中一共展示了Style::get_font_size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: inherit
/**
* Set inherited properties in this style using values in $parent
*
* @param Style $parent
*
* @return Style
*/
function inherit(Style $parent)
{
// Set parent font size
$this->_parent_font_size = $parent->get_font_size();
foreach (self::$_inherited as $prop) {
//inherit the !important property also.
//if local property is also !important, don't inherit.
if (isset($parent->_props[$prop]) && (!isset($this->_props[$prop]) || isset($parent->_important_props[$prop]) && !isset($this->_important_props[$prop]))) {
if (isset($parent->_important_props[$prop])) {
$this->_important_props[$prop] = true;
}
//see __set and __get, on all assignments clear cache!
$this->_prop_cache[$prop] = null;
$this->_props[$prop] = $parent->_props[$prop];
}
}
foreach ($this->_props as $prop => $value) {
if ($value === "inherit") {
if (isset($parent->_important_props[$prop])) {
$this->_important_props[$prop] = true;
}
//do not assign direct, but
//implicite assignment through __set, redirect to specialized, get value with __get
//This is for computing defaults if the parent setting is also missing.
//Therefore do not directly assign the value without __set
//set _important_props before that to be able to propagate.
//see __set and __get, on all assignments clear cache!
//$this->_prop_cache[$prop] = null;
//$this->_props[$prop] = $parent->_props[$prop];
//props_set for more obvious explicite assignment not implemented, because
//too many implicite uses.
// $this->props_set($prop, $parent->$prop);
$this->__set($prop, $parent->__get($prop));
}
}
return $this;
}
示例2: inherit
/**
* Set inherited properties in this style using values in $parent
*
* @param Style $parent
*/
function inherit(Style $parent)
{
// Set parent font size
$this->_parent_font_size = $parent->get_font_size();
foreach (self::$_inherited as $prop) {
if (!isset($this->_props[$prop]) && isset($parent->_props[$prop])) {
$this->_props[$prop] = $parent->_props[$prop];
}
}
foreach (array_keys($this->_props) as $prop) {
if ($this->_props[$prop] == "inherit") {
$this->{$prop} = $parent->{$prop};
}
}
return $this;
}
示例3: inherit
function inherit(Style $parent)
{
$this->_parent_font_size = $parent->get_font_size();
foreach (self::$_inherited as $prop) {
if (isset($parent->_props[$prop]) && (!isset($this->_props[$prop]) || isset($parent->_important_props[$prop]) && !isset($this->_important_props[$prop]))) {
if (isset($parent->_important_props[$prop])) {
$this->_important_props[$prop] = true;
}
$this->_prop_cache[$prop] = null;
$this->_props[$prop] = $parent->_props[$prop];
}
}
foreach (array_keys($this->_props) as $prop) {
if ($this->_props[$prop] === "inherit") {
if (isset($parent->_important_props[$prop])) {
$this->_important_props[$prop] = true;
}
$this->{$prop} = $parent->{$prop};
}
}
return $this;
}
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:22,代码来源:style.cls.php