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


PHP Wire::__get方法代碼示例

本文整理匯總了PHP中Wire::__get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Wire::__get方法的具體用法?PHP Wire::__get怎麽用?PHP Wire::__get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Wire的用法示例。


在下文中一共展示了Wire::__get方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __get

 public function __get($key)
 {
     if ($key == 'delimiter') {
         return $this->delimeter;
     }
     // @todo learn how to spell
     return parent::__get($key);
 }
開發者ID:Rizsti,項目名稱:Processwire_Compatibility,代碼行數:8,代碼來源:FileLog.php

示例2: __get

 public function __get($key)
 {
     $value = $this->get($key);
     if (is_null($value)) {
         $value = parent::__get($key);
     }
     return $value;
 }
開發者ID:nicolasleon,項目名稱:P21,代碼行數:8,代碼來源:SaveableItems.php

示例3: __get

 public function __get($key)
 {
     if ($key == 'pdo') {
         return $this->pdo;
     }
     return parent::__get($key);
 }
開發者ID:gusdecool,項目名稱:bunga-wire,代碼行數:7,代碼來源:WireDatabasePDO.php

示例4: __get

 /**
  * Handle non-function versions of some properties
  *
  */
 public function __get($key)
 {
     if ($key == 'path') {
         return $this->path();
     }
     if ($key == 'url') {
         return $this->url();
     }
     if ($key == 'page') {
         return $this->page;
     }
     return parent::__get($key);
 }
開發者ID:Rizsti,項目名稱:Processwire_Compatibility,代碼行數:17,代碼來源:PagefilesManager.php

示例5: __get

 /**	
  * Return a fuel or other property set to the Pages instance
  *
  */
 public function __get($key)
 {
     if ($key == 'outputFormatting') {
         return $this->outputFormatting;
     }
     if ($key == 'cloning') {
         return $this->cloning;
     }
     return parent::__get($key);
 }
開發者ID:posixpascal,項目名稱:TrooperCMS,代碼行數:14,代碼來源:Pages.php

示例6: get

 /**
  * Provides direct reference access to retrieve values in the $data array
  *
  * If the given $key is an object, it will cast it to a string. 
  * If the given key is a strain with "|" pipe characters in it, it will try all till it finds a value. 
  *
  * @param string|object $key
  * @return mixed|null Returns null if the key was not found. 
  *
  */
 public function get($key)
 {
     if (is_object($key)) {
         $key = "{$key}";
     }
     if (array_key_exists($key, $this->data)) {
         return $this->data[$key];
     }
     if (strpos($key, '|')) {
         $keys = explode('|', $key);
         foreach ($keys as $k) {
             if ($value = $this->get($k)) {
                 return $value;
             }
         }
     }
     return parent::__get($key);
     // back to Wire
 }
開發者ID:ryancramerdesign,項目名稱:ProcessWire-2.0,代碼行數:29,代碼來源:Data.php

示例7: __get

 /**	
  * Return a fuel or other property set to the Pages instance
  *
  */
 public function __get($key)
 {
     return parent::__get($key);
 }
開發者ID:nightsh,項目名稱:ProcessWire,代碼行數:8,代碼來源:Pages.php

示例8: __get

 /**
  * Enables derefencing of WireArray elements in object notation. 
  *
  * Example: $myArray->myElement
  * Not applicable to numerically indexed arrays. 
  * Fuel properties and hooked properties have precedence with this type of call.
  * 
  * @param int|string $property 
  * @return mixed Value of requested index, or false if it doesn't exist. 
  *
  */
 public function __get($property)
 {
     $value = parent::__get($property);
     if (is_null($value)) {
         $value = $this->getProperty($property);
     }
     if (is_null($value)) {
         $value = $this->get($property);
     }
     return $value;
 }
開發者ID:Rizsti,項目名稱:Processwire_Compatibility,代碼行數:22,代碼來源:WireArray.php

示例9: __get

 public function __get($key)
 {
     return isset($this->data[$key]) ? $this->data[$key] : parent::__get($name);
 }
開發者ID:uiii,項目名稱:ProcessWire-FieldtypePartialDate,代碼行數:4,代碼來源:PartialDate.php


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