public getByAbbreviation ( string $abbreviation ) : void | ||
$abbreviation | string | |
Результат | void |
public function getByAbbreviation($abbreviation)
{
$classRaw = $this->db->fetchRow("SELECT * FROM " . self::TABLE_NAME . " WHERE abbreviation=" . $this->db->quote($abbreviation));
if (empty($classRaw)) {
throw new \Exception("Unit " . $abbreviation . " not found.");
}
$this->assignVariablesToModel($classRaw);
}