當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Style::get_font_size方法代碼示例

本文整理匯總了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;
 }
開發者ID:skyosev,項目名稱:OpenCart-Overclocked,代碼行數:44,代碼來源:style.cls.php

示例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;
 }
開發者ID:artre,項目名稱:study,代碼行數:21,代碼來源:style.cls.php

示例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


注:本文中的Style::get_font_size方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。