/** * isValidResourceId * * @param string $resourceId resourceId * * @return bool */ public function isValidResourceId($resourceId) { return ResourceIdValidator::isValid($resourceId); }
/** * setResourceId * * @param string $resourceId * * @return void * @throws RcmUserException */ public function setResourceId($resourceId) { $resourceId = ResourceIdFilter::filter($resourceId); if (!ResourceIdValidator::isValid($resourceId) || empty($resourceId)) { throw new RcmUserException("Resource resourceId ({$resourceId}) is invalid for rule."); } $this->resourceId = $resourceId; }