public static function invalidNamedRouteSyntax()
{
return new self('Invalid named route syntax. ' . 'Must use a formatted string of: {EntityClassName}::{RouteName}. Eg "Entities\\User::get_users"');
}
/** * Check the format of the named route * @param $namedRoute * @throws DrestException */ protected function checkNamedRoute($namedRoute) { if (substr_count($namedRoute, '::') !== 1) { throw DrestException::invalidNamedRouteSyntax(); } if (sizeof(explode('::', $namedRoute)) !== 2) { throw DrestException::invalidNamedRouteSyntax(); } }