本文整理汇总了PHP中SimpleORMap::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleORMap::getValue方法的具体用法?PHP SimpleORMap::getValue怎么用?PHP SimpleORMap::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleORMap
的用法示例。
在下文中一共展示了SimpleORMap::getValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getValue
/**
* Specialized getter for values. Will try to obtain the value
* and if an error occurs, convert it to snake case and try again.
*
* @param String $field Field name
* @return mixed Contents of the variable with the key "$field"
* @throws InvalidArgumentException when the field is invalid
* @todo This should be removed after a while (today is 2015-11-19)
*/
public function getValue($field)
{
try {
return parent::getValue($field);
} catch (Exception $e) {
$field = $this->convertLegacyFields($field);
return parent::getValue($field);
}
}
示例2: getValue
/**
* Proxy the static methods "getDescription", "getName" and
* "getParameters" from the task class.
*
* @param String $field Field which should be accessed.
* @return String Value of the method call
*/
public function getValue($field)
{
if (in_array($field, words('description name parameters'))) {
if ($this->valid) {
$method = 'get' . ucfirst($field);
return call_user_func("{$this->class}::{$method}");
} elseif ($field === 'description') {
return _('Unbekannt');
} elseif ($field === 'name') {
return preg_replace('/(_Cronjob)?(\\.class)?\\.php$/', '', basename($this->filename)) . ' (' . _('fehlerhaft') . ')';
} elseif ($field === 'parameters') {
return array();
}
}
return parent::getValue($field);
}