private function PersistentObject::get in Plug 7
Gets a persistent field value.
Parameters
string $field:
Return value
mixed
Throws
\BadMethodCallException When no persistent field exists by that name.
1 call to PersistentObject::get()
- PersistentObject::__call in lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ PersistentObject.php - Magic methods.
File
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ PersistentObject.php, line 147
Class
- PersistentObject
- PersistentObject base class that implements getter/setter methods for all mapped fields and associations by overriding __call.
Namespace
Doctrine\Common\PersistenceCode
private function get($field) {
$this
->initializeDoctrine();
if ($this->cm
->hasField($field) || $this->cm
->hasAssociation($field)) {
return $this->{$field};
}
else {
throw new \BadMethodCallException("no field with name '" . $field . "' exists on '" . $this->cm
->getName() . "'");
}
}