Ich habe eine Klasse Setting wie folgt definiert:
$name;
}
public function __set($key, $value){
$this->$key = $value;
}
public function getFullName() {
return $this->name . ' suffix';
}
public static function getValue($settingName) {
$result = '';
try {
$setting = em()->createQuery('SELECT s FROM Setting s WHERE s.name = :name')
->setParameter('name', $settingName)
->getSingleResult();
$result = $setting->value;
}
catch (\Doctrine\ORM\NoResultException $exception) {
}
return $result;
}
}
Leider führt dies zu einem Fehler: Fatal error: Uncaught exception 'Doctrine\ORM\Mapping\MappingException' with message 'Class "Setting" is not a valid entity or mapped super class.' in xxxxx/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php on line 216
Wie kann dies gelöst werden?