Ejemplo n.º 1
0
 /**
  * isValidResourceId
  *
  * @param string $resourceId resourceId
  *
  * @return bool
  */
 public function isValidResourceId($resourceId)
 {
     return ResourceIdValidator::isValid($resourceId);
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }