/**
* Add a base path to be used when matching routes. Eg /v1 would be useful IF you want versioning in the URL
* @param string $basePath
* @throws DrestException
*/
public function addRouteBasePath($basePath)
{
if (!is_string($basePath)) {
throw DrestException::basePathMustBeAString();
}
$this->_attributes['routeBasePaths'][] = trim($basePath, '/');
}