PHP Класс RDbAuthManager, gxc-cms

С версии: 0.9.7
Автор: Christoffer Niska ([email protected])
Наследование: extends CDbAuthManager
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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