protected function _validateScopeParam($scope) { if (!in_array($scope, $this->_scopes)) { throw new InvalidArgumentException(sprintf('Invalid scope parameter, must be one of: %s.', implode(', ', $this->_scopes))); } return $scope; }