PHP Интерфейс Imbo\Auth\AccessControl\Adapter\AdapterInterface

Автор: Espen Hovlandsdal ([email protected])
Показать файл Открыть проект

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

Метод Описание
getAccessListForPublicKey ( string $publicKey ) : array Get the access control list for a given public key
getAccessRule ( string $publicKey, array $accessRuleId ) : array Get an access rule by id
getGroup ( string $groupName ) : array Fetch a resource group with the given name
getGroups ( Imbo\Auth\AccessControl\GroupQuery $query = null, Groups $model ) : array Fetch a list of available resource groups
getPrivateKey ( string $publicKey ) : string Return the private key for a given public key
getUsersForResource ( string $publicKey, string $resource ) : array Get a list of users the public key has access for on a given resource
groupExists ( string $groupName ) : boolean Check whether or not a group exists
hasAccess ( string $publicKey, string $resource, string $user = null ) : boolean Check if a given public key has access to a given resource
publicKeyExists ( string $publicKey ) : boolean Get whether a public key exists or not

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

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

Get the access control list for a given public key
public getAccessListForPublicKey ( string $publicKey ) : array
$publicKey string
Результат array

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

Get an access rule by id
public getAccessRule ( string $publicKey, array $accessRuleId ) : array
$publicKey string Public key to add access rule to
$accessRuleId array Access rule id
Результат array Access rule

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

Fetch a resource group with the given name
public getGroup ( string $groupName ) : array
$groupName string Name of the group
Результат array Array of resources the group consists of

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

Fetch a list of available resource groups
public getGroups ( Imbo\Auth\AccessControl\GroupQuery $query = null, Groups $model ) : array
$query Imbo\Auth\AccessControl\GroupQuery A query object used to filter the groups returned
$model Imbo\Model\Groups Groups model to populate total number of hits with
Результат array

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

Return the private key for a given public key
public getPrivateKey ( string $publicKey ) : string
$publicKey string The public key to fetch matching private key for
Результат string Returns the private key for the public key

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

Get a list of users the public key has access for on a given resource
public getUsersForResource ( string $publicKey, string $resource ) : array
$publicKey string Public key to check access for
$resource string Resource identifier (e.g. image.get, images.post)
Результат array List of users the public key kan access the given resource for

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

Check whether or not a group exists
public groupExists ( string $groupName ) : boolean
$groupName string Name of the group
Результат boolean

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

Check if a given public key has access to a given resource
public hasAccess ( string $publicKey, string $resource, string $user = null ) : boolean
$publicKey string Public key to check access for
$resource string Resource identifier (e.g. image.get, images.post)
$user string Optional user which the resource belongs to
Результат boolean True if public key has access, false otherwise

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

Get whether a public key exists or not
public publicKeyExists ( string $publicKey ) : boolean
$publicKey string Public key to check
Результат boolean