本文整理匯總了PHP中Doctrine_Record::getRecord方法的典型用法代碼示例。如果您正苦於以下問題:PHP Doctrine_Record::getRecord方法的具體用法?PHP Doctrine_Record::getRecord怎麽用?PHP Doctrine_Record::getRecord使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Doctrine_Record
的用法示例。
在下文中一共展示了Doctrine_Record::getRecord方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: filterGet
/**
* Filter Doctrine_Record::get() calls and see if we can call the property on
* the content type record
*
* @param Doctrine_Record $content The sfSympalContent instance
* @param string $name The name of the property
* @return mixed $value The value of the property
* @throws Doctrine_Record_UnknownPropertyException If property could not be found
*/
public function filterGet(Doctrine_Record $content, $name)
{
try {
if ($content->getRecord()) {
return $content->getRecord()->get($name);
}
} catch (Exception $e) {
}
throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $name, get_class($content)));
}