Get persistent field value.
string $field:
mixed
\BadMethodCallException - When no persistent field exists by that name.
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() . "'");
}
}