PHP 클래스 RDbAuthManager, gxc-cms

부터: 0.9.7
저자: Christoffer Niska ([email protected])
상속: extends CDbAuthManager
파일 보기 프로젝트 열기: nganhtuan63/gxc-cms

공개 프로퍼티들

프로퍼티 타입 설명
$assignmentTable the name of the table storing authorization item assignments. Defaults to 'AuthAssignment'.
$itemChildTable the name of the table storing authorization item hierarchy. Defaults to 'AuthItemChild'.
$itemTable
$rightsTable the name of the rights table.

공개 메소드들

메소드 설명
addItemChild ( string $itemName, string $childName ) Adds an item as a child of another item.
assign ( string $itemName, mixed $userId, string $bizRule = null, mixed $data = null ) : CAuthAssignment Assigns an authorization item to a user making sure that the user doesn't already have this assignment.
getAssignmentsByItemName ( $name )
getAuthItem ( string $name, boolean $allowCaching = true ) : CAuthItem Returns the authorization item with the specified name.
getAuthItems ( integer $type = null, mixed $userId = null, boolean $sort = true ) : array Returns the authorization items of the specific type and user.
getAuthItemsByNames ( array $names, boolean $nested = false ) : array Returns the specified authorization items.
getItemChildren ( mixed $names, boolean $allowCaching = true ) : array Returns the children of the specified item.
updateItemWeight ( array $result ) Updates the authorization items weight.

메소드 상세

addItemChild() 공개 메소드

Overloads the parent method to make sure that we do not add already existing children.
public addItemChild ( string $itemName, string $childName )
$itemName string the item name.
$childName string the child item name.

assign() 공개 메소드

Overloads the parent method to make sure that we do not assign already assigned items.
public assign ( string $itemName, mixed $userId, string $bizRule = null, mixed $data = null ) : CAuthAssignment
$itemName string the item name.
$userId mixed the user ID (see {@link IWebUser::getId})
$bizRule string the business rule to be executed when {@link checkAccess} is called for this particular authorization item.
$data mixed additional data associated with this assignment.
리턴 CAuthAssignment the authorization assignment information.

getAssignmentsByItemName() 공개 메소드

public getAssignmentsByItemName ( $name )

getAuthItem() 공개 메소드

Overloads the parent method to allow for runtime caching.
public getAuthItem ( string $name, boolean $allowCaching = true ) : CAuthItem
$name string the name of the item.
$allowCaching boolean whether to accept cached data.
리턴 CAuthItem the authorization item. Null if the item cannot be found.

getAuthItems() 공개 메소드

Overloads the parent method to allow for sorting.
public getAuthItems ( integer $type = null, mixed $userId = null, boolean $sort = true ) : array
$type integer the item type (0: operation, 1: task, 2: role). Defaults to null, meaning returning all items regardless of their type.
$userId mixed the user ID. Defaults to null, meaning returning all items even if they are not assigned to a user.
$sort boolean whether to sort the items according to their weights.
리턴 array the authorization items of the specific type.

getAuthItemsByNames() 공개 메소드

Returns the specified authorization items.
public getAuthItemsByNames ( array $names, boolean $nested = false ) : array
$names array the names of the authorization items to get.
$nested boolean whether to nest the items by type.
리턴 array the authorization items.

getItemChildren() 공개 메소드

Overloads the parent method to allow for caching.
public getItemChildren ( mixed $names, boolean $allowCaching = true ) : array
$names mixed the parent item name. This can be either a string or an array. The latter represents a list of item names (available since version 1.0.5).
$allowCaching boolean whether to accept cached data.
리턴 array all child items of the parent

updateItemWeight() 공개 메소드

Updates the authorization items weight.
public updateItemWeight ( array $result )
$result array the result returned from jui-sortable.

프로퍼티 상세

$assignmentTable 공개적으로 프로퍼티

the name of the table storing authorization item assignments. Defaults to 'AuthAssignment'.
public $assignmentTable

$itemChildTable 공개적으로 프로퍼티

the name of the table storing authorization item hierarchy. Defaults to 'AuthItemChild'.
public $itemChildTable

$itemTable 공개적으로 프로퍼티

public $itemTable

$rightsTable 공개적으로 프로퍼티

the name of the rights table.
public $rightsTable