當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。