本文整理汇总了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);
}
示例2: get
public function get($key)
{
if ($key == 'className' || $key == 'class' || $key == 'name') {
return $this->class;
}
return parent::get($key);
}
示例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);
}
示例4: get
public function get($key)
{
if ($key == 'statusString') {
return str_replace('_', ' ', $this->geocodeStatuses[$this->status]);
}
return parent::get($key);
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}