本文整理匯總了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);
}