PHP 클래스 AppserverIo\Appserver\ServletEngine\Security\SimpleGroup

상속: extends SimplePrincipal, implements AppserverIo\Psr\Security\Acl\GroupInterface
파일 보기 프로젝트 열기: appserver-io/appserver

공개 메소드들

메소드 설명
__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