当前位置: 首页>>代码示例>>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;未经允许,请勿转载。