当前位置: 首页>>代码示例>>PHP>>正文


PHP WireData::get方法代码示例

本文整理汇总了PHP中WireData::get方法的典型用法代码示例。如果您正苦于以下问题:PHP WireData::get方法的具体用法?PHP WireData::get怎么用?PHP WireData::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WireData的用法示例。


在下文中一共展示了WireData::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get

 public function get($key)
 {
     if ($key == 'operator') {
         return $this->getOperator();
     }
     return parent::get($key);
 }
开发者ID:nicolasleon,项目名称:P21,代码行数:7,代码来源:Selector.php

示例2: get

 public function get($key)
 {
     if ($key == 'className' || $key == 'class' || $key == 'name') {
         return $this->class;
     }
     return parent::get($key);
 }
开发者ID:avatar382,项目名称:fablab_site,代码行数:7,代码来源:ModulePlaceholder.php

示例3: get

 /**
  * Get a value stored in this Process
  *
  */
 public function get($key)
 {
     if (($value = $this->getFuel($key)) !== null) {
         return $value;
     }
     return parent::get($key);
 }
开发者ID:rzelnik,项目名称:ProcessWire,代码行数:11,代码来源:Process.php

示例4: get

 public function get($key)
 {
     if ($key == 'statusString') {
         return str_replace('_', ' ', $this->geocodeStatuses[$this->status]);
     }
     return parent::get($key);
 }
开发者ID:ranzwertig,项目名称:FieldtypeMapMarker,代码行数:7,代码来源:MapMarker.php

示例5: get

 public function get($key)
 {
     if ($key == 'user' || $key == 'createdUser') {
         if (!$this->settings['created_users_id']) {
             return $this->users->get(Users::guestUserID);
         }
         return $this->users->get($this->settings['created_users_id']);
     }
     return parent::get($key);
 }
开发者ID:ryancramerdesign,项目名称:ProcessWire-2.0,代码行数:10,代码来源:Comment.php

示例6: get

 /**
  * Retrieve a value from the ImageMarker: date, location or notes
  *
  */
 public function get($key)
 {
     $value = parent::get($key);
     // if the page's output formatting is on, then we'll return formatted values
     if ($this->page && $this->page->of()) {
         // int sanitizer
         if ($key == 'info' || $key == 'x' || $key == 'y') {
             $value = (int) $value;
         }
     }
     return $value;
 }
开发者ID:kongondo,项目名称:FieldtypeImageMarker,代码行数:16,代码来源:ImageMarker.php

示例7: get

 public function get($key)
 {
     if ($key == 'user' || $key == 'createdUser') {
         if (!$this->settings['created_users_id']) {
             return $this->users->get($this->config->guestUserID);
         }
         return $this->users->get($this->settings['created_users_id']);
     } else {
         if ($key == 'gravatar') {
             return $this->gravatar();
         }
     }
     return parent::get($key);
 }
开发者ID:avatar382,项目名称:fablab_site,代码行数:14,代码来源:Comment.php

示例8: get

 /**
  * Return the requested path variable
  *
  */
 public function get($key)
 {
     $value = parent::get($key);
     if ($key == 'root') {
         return $value;
     }
     if (!is_null($value)) {
         if ($value[0] == '/' || DIRECTORY_SEPARATOR != '/' && $value[1] == ':') {
             return $value;
         } else {
             $value = $this->root . $value;
         }
     }
     return $value;
 }
开发者ID:ryancramerdesign,项目名称:ProcessWire-2.0,代码行数:19,代码来源:Paths.php

示例9: get

 /**
  * Get a Template property
  *
  * @param string $key
  * @return mixed
  *
  */
 public function get($key)
 {
     if ($key == 'filename') {
         return $this->filename();
     }
     if ($key == 'fields') {
         $key = 'fieldgroup';
     }
     if ($key == 'fieldgroup') {
         return $this->fieldgroup;
     }
     if ($key == 'fieldgroupPrevious') {
         return $this->fieldgroupPrevious;
     }
     return isset($this->settings[$key]) ? $this->settings[$key] : parent::get($key);
 }
开发者ID:ryancramerdesign,项目名称:ProcessWire-2.0,代码行数:23,代码来源:Template.php

示例10: get

 /**
  * Retrieve a value from the event: date, location or notes
  *
  */
 public function get($key)
 {
     $value = parent::get($key);
     // if the page's output formatting is on, then we'll return formatted values
     if ($this->page && $this->page->of()) {
         if ($key == 'date') {
             // format a unix timestamp to a date string
             $value = date(self::dateFormat, $value);
         } else {
             if ($key == 'location' || $key == 'notes') {
                 // return entity encoded versions of strings
                 $value = $this->sanitizer->entities($value);
             }
         }
     }
     return $value;
 }
开发者ID:bensssyde,项目名称:FieldtypeEvents,代码行数:21,代码来源:Event.php

示例11: getProperty

 /**
  * Get the language-aware property
  * 
  * @param string $property Either 'title' or 'value'
  * @return string
  * 
  */
 protected function getProperty($property)
 {
     if ($this->wire('languages')) {
         $language = $this->wire('user')->language;
         if ($language->isDefault()) {
             $value = parent::get($property);
         } else {
             $value = parent::get("{$property}{$language}");
             // fallback to default language title if no title present for language
             if (!strlen($value)) {
                 $value = parent::get($property);
             }
         }
     } else {
         $value = parent::get($property);
     }
     if ($this->of) {
         $value = $this->wire('sanitizer')->entities($value);
     }
     return $value;
 }
开发者ID:Rizsti,项目名称:Processwire_Compatibility,代码行数:28,代码来源:SelectableOption.php

示例12: get

 /**
  * Get a Template property
  *
  * @param string $key
  * @return mixed
  *
  */
 public function get($key)
 {
     if ($key == 'filename') {
         return $this->filename();
     }
     if ($key == 'fields') {
         $key = 'fieldgroup';
     }
     if ($key == 'fieldgroup') {
         return $this->fieldgroup;
     }
     if ($key == 'fieldgroupPrevious') {
         return $this->fieldgroupPrevious;
     }
     if ($key == 'roles') {
         return $this->getRoles();
     }
     if ($key == 'cacheTime') {
         $key = 'cache_time';
     }
     // for camel case consistency
     if ($key == 'icon') {
         return $this->getIcon();
     }
     return isset($this->settings[$key]) ? $this->settings[$key] : parent::get($key);
 }
开发者ID:avatar382,项目名称:fablab_site,代码行数:33,代码来源:Template.php

示例13: getIcon

 /**
  * Return the icon used by this field, or blank if none
  * 
  * @param bool $prefix Whether or not you want the fa- prefix included
  * @return mixed|string
  * 
  */
 public function getIcon($prefix = false)
 {
     $icon = parent::get('icon');
     if (empty($icon)) {
         return '';
     }
     if (strpos($icon, 'fa-') === 0) {
         $icon = str_replace('fa-', '', $icon);
     }
     if (strpos($icon, 'icon-') === 0) {
         $icon = str_replace('icon-', '', $icon);
     }
     return $prefix ? "fa-{$icon}" : $icon;
 }
开发者ID:posixpascal,项目名称:TrooperCMS,代码行数:21,代码来源:Field.php

示例14: get

 /**
  * Get a user setting or data value
  *
  */
 public function get($key)
 {
     if ($key == 'roles') {
         return $this->rolesArray;
     }
     if (isset($this->settings[$key])) {
         return $this->settings[$key];
     }
     return parent::get($key);
 }
开发者ID:ryancramerdesign,项目名称:ProcessWire-2.0,代码行数:14,代码来源:User.php

示例15: getSetting

 /**
  * Gets a setting or fuel from the Inputfield, while ignoring attributes and anything else
  *
  * To be used in cases where there is a potential name conflict, like the 'collapsed' field when in the Fields editor.
  * Otherwise don't bother using this method. 
  *
  */
 public function getSetting($key)
 {
     return parent::get($key);
 }
开发者ID:nicolasleon,项目名称:P21,代码行数:11,代码来源:Inputfield.php


注:本文中的WireData::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。