PHP Class Acl\Shell\AclShell

Inheritance: extends Cake\Console\Shell
Afficher le fichier Open project: cakephp/acl

Méthodes publiques

Свойство Type Description
$Acl Acl\Controller\Component\AclComponent Contains instance of AclComponent
$args array Contains arguments parsed from the command line.
$connection string Contains database source to use
$tasks array Contains tasks to load and instantiate

Méthodes publiques

Méthode Description
check ( ) : void Check permission for a given ARO to a given ACO.
create ( ) : void Creates an ARO/ACO node
delete ( ) : void Delete an ARO/ACO node.
deny ( ) : void Deny access for an ARO to an ACO.
getOptionParser ( ) : ConsoleOptionParser Gets the option parser instance and configures it.
getPath ( ) : void Get path to specified ARO/ACO node.
grant ( ) : void Grant permission for a given ARO to a given ACO.
inherit ( ) : void Set an ARO to inherit permission to an ACO.
main ( ) : void Override main() for help message hook
nodeExists ( ) : boolean Checks that given node exists
parseIdentifier ( string $identifier ) : mixed Parse an identifier into Model.foreignKey or an alias.
setParent ( ) : void Set parent for an ARO/ACO node.
startup ( ) : void Override startup of the Shell
view ( ) : void Show a specific ARO/ACO node.

Méthodes protégées

Méthode Description
_dataVars ( string $type = null ) : array Build data parameters based on node type
_getNodeId ( string $class, string | array $identifier ) : integer | null Get the node for a given identifier. $identifier can either be a string alias or an array of properties to use in AcoNode::node()
_getParams ( ) : array get params for standard Acl methods
_outputNode ( string $class, array $node, integer $indent ) : void Outputs a single node, Either using the alias or Model.key

Method Details

_dataVars() protected méthode

Build data parameters based on node type
protected _dataVars ( string $type = null ) : array
$type string Node type (ARO/ACO)
Résultat array Variables

_getNodeId() protected méthode

Get the node for a given identifier. $identifier can either be a string alias or an array of properties to use in AcoNode::node()
protected _getNodeId ( string $class, string | array $identifier ) : integer | null
$class string Class type you want (Aro/Aco)
$identifier string | array A mixed identifier for finding the node.
Résultat integer | null Integer of NodeId. Will trigger an error if nothing is found.

_getParams() protected méthode

get params for standard Acl methods
protected _getParams ( ) : array
Résultat array aro, aco, action

_outputNode() protected méthode

Outputs a single node, Either using the alias or Model.key
protected _outputNode ( string $class, array $node, integer $indent ) : void
$class string Class name that is being used.
$node array Array of node information.
$indent integer indent level.
Résultat void

check() public méthode

Check permission for a given ARO to a given ACO.
public check ( ) : void
Résultat void

create() public méthode

Creates an ARO/ACO node
public create ( ) : void
Résultat void

delete() public méthode

Delete an ARO/ACO node.
public delete ( ) : void
Résultat void

deny() public méthode

Deny access for an ARO to an ACO.
public deny ( ) : void
Résultat void

getOptionParser() public méthode

Gets the option parser instance and configures it.
public getOptionParser ( ) : ConsoleOptionParser
Résultat ConsoleOptionParser

getPath() public méthode

Get path to specified ARO/ACO node.
public getPath ( ) : void
Résultat void

grant() public méthode

Grant permission for a given ARO to a given ACO.
public grant ( ) : void
Résultat void

inherit() public méthode

Set an ARO to inherit permission to an ACO.
public inherit ( ) : void
Résultat void

main() public méthode

Override main() for help message hook
public main ( ) : void
Résultat void

nodeExists() public méthode

Checks that given node exists
public nodeExists ( ) : boolean
Résultat boolean Success

parseIdentifier() public méthode

Takes an identifier determines its type and returns the result as used by other methods.
public parseIdentifier ( string $identifier ) : mixed
$identifier string Identifier to parse
Résultat mixed a string for aliases, and an array for model.foreignKey

setParent() public méthode

Set parent for an ARO/ACO node.
public setParent ( ) : void
Résultat void

startup() public méthode

Override startup of the Shell
public startup ( ) : void
Résultat void

view() public méthode

Show a specific ARO/ACO node.
public view ( ) : void
Résultat void

Property Details

$Acl public_oe property

Contains instance of AclComponent
public AclComponent,Acl\Controller\Component $Acl
Résultat Acl\Controller\Component\AclComponent

$args public_oe property

Contains arguments parsed from the command line.
public array $args
Résultat array

$connection public_oe property

Contains database source to use
public string $connection
Résultat string

$tasks public_oe property

Contains tasks to load and instantiate
public array $tasks
Résultat array