newPermission() abstract public method

Returns a new permissions object.
abstract public newPermission ( string $name, string $type = 'matrix', array $params = null ) : Horde_Perms_Permission
$name string The permission's name.
$type string The permission type.
$params array The permission parameters.
return Horde_Perms_Permission A new permissions object.
示例#1
0
文件: Perms.php 项目: horde/horde
 /**
  * Returns a new permissions object.
  *
  * This must be used instead of Horde_Perms_Base::newPermission() because
  * it works with application-specific permissions.
  *
  * @param string $name   The permission's name.
  *
  * @return Horde_Perms_Permission  A new permissions object.
  */
 public function newPermission($name)
 {
     return $this->_perms->newPermission($name, $this->getType($name), $this->getParams($name));
 }