hasMappedValue() public method

Tests whether a mapped value exists
public hasMappedValue ( string $name ) : boolean
$name string the name of the property
return boolean
コード例 #1
0
ファイル: Filter.php プロジェクト: atikahmed/joomla-probid
 /**
  * @param Doctrine_Record $record
  * @param mixed           $name
  *
  * @return mixed
  * @throws Doctrine_Record_UnknownPropertyException
  */
 public function filterGet(Doctrine_Record $record, $name)
 {
     $method = '_get' . ucfirst($name);
     if (method_exists($this, $method)) {
         if (!$record->hasMappedValue($name)) {
             $record->mapValue($name, $this->{$method}($record));
         }
         return $record->get($name);
     }
     throw new Doctrine_Record_UnknownPropertyException(sprintf('Unknown record property "%s" on "%s"', $name, get_class($record)));
 }