validate() публичный Метод

throws an exception if there's anything wrong with the roles
public validate ( mixed $roles ) : void
$roles mixed the roles to validate
Результат void
Пример #1
0
 /**
  * tell this host what roles it supports
  *
  * @param array<string> $roles
  *        a list of the roles that it supports
  */
 public function setRoles($roles)
 {
     // make sure we have what we expect
     $rolesValidator = new TestEnvironment_RolesValidator($this);
     $rolesValidator->validate($roles);
     // remember the roles
     $this->roles = $roles;
     // all done
     // fluent interface support
     return $this;
 }