/** * 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'); } }
/** * Sets default ACL role(s) to use when iterating pages if not explicitly * set later with {@link setRole()} * * @param mixed $role [optional] role to set. Expects null, string, or an * instance of {@link Acl\Role\RoleInterface}. 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\RoleInterface) { self::$defaultRole = $role; } else { throw new Exception\InvalidArgumentException(sprintf('$role must be null|string|Zend\\Acl\\Role\\RoleInterface; received "%s"', is_object($role) ? get_class($role) : gettype($role))); } }