PHP Класс AppserverIo\Appserver\ServletEngine\Security\SimpleGroup

Автор: Tim Wagner ([email protected])
Наследование: extends SimplePrincipal, implements AppserverIo\Psr\Security\Acl\GroupInterface
Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( string $name ) Initialize the principal with the passed name.
__toString ( ) : string Returns the principals name as string.
addMember ( AppserverIo\Psr\Security\PrincipalInterface $pricipal ) : boolean Adds the passed principal to the group.
getMembers ( ) : AppserverIo\Collections\HashMap Return's the group's members.
isMember ( AppserverIo\Psr\Security\PrincipalInterface $principal ) : boolean Returns TRUE if the passed principal is a member of the group.
removeMember ( AppserverIo\Psr\Security\PrincipalInterface $principal ) : boolean Removes the passed principal from the group.

Описание методов

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

Initialize the principal with the passed name.
public __construct ( string $name )
$name string The principal's name

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

Returns the principals name as string.
public __toString ( ) : string
Результат string The principal's name

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

Adds the passed principal to the group.
public addMember ( AppserverIo\Psr\Security\PrincipalInterface $pricipal ) : boolean
$pricipal AppserverIo\Psr\Security\PrincipalInterface The principal to add
Результат boolean TRUE if the member was successfully added, FALSE if the principal was already a member

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

Return's the group's members.
public getMembers ( ) : AppserverIo\Collections\HashMap
Результат AppserverIo\Collections\HashMap The group members

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

This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned. A special check is made to see if the member is an instance of AnybodyPrincipal or NobodyPrincipal since these classes do not hash to meaningful values.
public isMember ( AppserverIo\Psr\Security\PrincipalInterface $principal ) : boolean
$principal AppserverIo\Psr\Security\PrincipalInterface The principal to query membership for
Результат boolean TRUE if the principal is a member of this group, FALSE otherwise

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

Removes the passed principal from the group.
public removeMember ( AppserverIo\Psr\Security\PrincipalInterface $principal ) : boolean
$principal AppserverIo\Psr\Security\PrincipalInterface The principal to remove
Результат boolean TRUE if the member was successfully removed, FALSE if the principal was not a member