PHP 클래스 Pop\Auth\Role

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$children array Role children
$name string Role name
$parent Role Role parent
$permissions array Role permissions

공개 메소드들

메소드 설명
__construct ( string $name ) : Role Constructor
__toString ( ) : string Method to return the string value of the name of the role
addChild ( mixed $role ) : Role Method to add a child role
addPermission ( string $name ) : Role Method to add a permission to the role
factory ( string $name ) : Role Static method to instantiate the role object and return itself to facilitate chaining methods together.
getName ( ) : string Method to get the role name
getParent ( ) : Role Method to get the role parent
hasParent ( ) : Role Method to see if the role has a parent
hasPermission ( string $name ) : boolean Method to check if a role has a permission
setParent ( Role $parent ) : Role Method to set the role parent

메소드 상세

__construct() 공개 메소드

Instantiate the role object
public __construct ( string $name ) : Role
$name string
리턴 Role

__toString() 공개 메소드

Method to return the string value of the name of the role
public __toString ( ) : string
리턴 string

addChild() 공개 메소드

Method to add a child role
public addChild ( mixed $role ) : Role
$role mixed
리턴 Role

addPermission() 공개 메소드

Method to add a permission to the role
public addPermission ( string $name ) : Role
$name string
리턴 Role

factory() 공개 정적인 메소드

Static method to instantiate the role object and return itself to facilitate chaining methods together.
public static factory ( string $name ) : Role
$name string
리턴 Role

getName() 공개 메소드

Method to get the role name
public getName ( ) : string
리턴 string

getParent() 공개 메소드

Method to get the role parent
public getParent ( ) : Role
리턴 Role

hasParent() 공개 메소드

Method to see if the role has a parent
public hasParent ( ) : Role
리턴 Role

hasPermission() 공개 메소드

Method to check if a role has a permission
public hasPermission ( string $name ) : boolean
$name string
리턴 boolean

setParent() 공개 메소드

Method to set the role parent
public setParent ( Role $parent ) : Role
$parent Role
리턴 Role

프로퍼티 상세

$children 보호되어 있는 프로퍼티

Role children
protected array $children
리턴 array

$name 보호되어 있는 프로퍼티

Role name
protected string $name
리턴 string

$parent 보호되어 있는 프로퍼티

Role parent
protected Role,Pop\Auth $parent
리턴 Role

$permissions 보호되어 있는 프로퍼티

Role permissions
protected array $permissions
리턴 array