protected function validateName($name) { if (!preg_match('/^[0-9A-Za-z\\_\\-]{1,63}$/', $name)) { throw new \Exception(sprintf('`%s` is not a valid repository name.', $name)); } return true; }