getById($id); if (is_null($data)) self::notFound(); return $data; } /** * @param $id int */ public static function deleteById($id) { static::getDataAccess()->deleteById($id); } /** * @return LuDataAccess */ protected static function getDataAccess() { return null; } public static function getAll($page = 0, $perPage = PHP_INT_MAX) { return static::getDataAccess()->getAll($page, $perPage); } }