コード例 #1
0
ファイル: AbstractHelper.php プロジェクト: rsandrea/zf2
 /**
  * Sets default ACL role(s) to use when iterating pages if not explicitly
  * set later with {@link setRole()}
  *
  * @param  midex $role               [optional] role to set. Expects null,
  *                                   string, or an instance of
  *                                   {@link Zend_Acl_Role_Interface}.
  *                                   Default is null, which sets no default
  *                                   role.
  * @return void
  * @throws Exception\InvalidArgumentException if role is invalid
  */
 public static function setDefaultRole($role = null)
 {
     if (null === $role || is_string($role) || $role instanceof Acl\Role) {
         self::$_defaultRole = $role;
     } else {
         throw new Exception\InvalidArgumentException('$role must be null|string|Zend_Acl_Role_Interface');
     }
 }