PHP Class Acl\Adapter\IniAcl

Inheritance: implements Acl\AclInterface
Show file Open project: cakephp/acl Class Usage Examples

Public Properties

Property Type Description
$userPath string The Hash::extract() path to the user/aro identifier in the acl.ini file. This path will be used to extract the string representation of a user used in the ini file.

Protected Properties

Property Type Description
$_defaultConfig array Default config for this class

Public Methods

Method Description
__construct ( ) Constructor
allow ( string $aro, string $aco, string $action = "*" ) : void No op method, allow cannot be done with IniAcl
arrayTrim ( array $array ) : array Removes trailing spaces on all array elements (to prepare for searching)
check ( string $aro, string $aco, string $action = null ) : boolean Main ACL check function. Checks to see if the ARO (access request object) has access to the ACO (access control object).Looks at the acl.ini file for permissions (see instructions in /config/acl.ini).
deny ( string $aro, string $aco, string $action = "*" ) : void No op method, deny cannot be done with IniAcl
inherit ( string $aro, string $aco, string $action = "*" ) : void No op method, inherit cannot be done with IniAcl
initialize ( Component $component ) : void Initialize method
readConfigFile ( string $filename ) : array Parses an INI file and returns an array that reflects the INI file's section structure. Double-quote friendly.

Method Details

__construct() public method

Sets a few default settings up.
public __construct ( )

allow() public method

No op method, allow cannot be done with IniAcl
public allow ( string $aro, string $aco, string $action = "*" ) : void
$aro string ARO The requesting object identifier.
$aco string ACO The controlled object identifier.
$action string Action (defaults to *)
return void

arrayTrim() public method

Removes trailing spaces on all array elements (to prepare for searching)
public arrayTrim ( array $array ) : array
$array array Array to trim
return array Trimmed array

check() public method

Main ACL check function. Checks to see if the ARO (access request object) has access to the ACO (access control object).Looks at the acl.ini file for permissions (see instructions in /config/acl.ini).
public check ( string $aro, string $aco, string $action = null ) : boolean
$aro string ARO
$aco string ACO
$action string Action
return boolean Success

deny() public method

No op method, deny cannot be done with IniAcl
public deny ( string $aro, string $aco, string $action = "*" ) : void
$aro string ARO The requesting object identifier.
$aco string ACO The controlled object identifier.
$action string Action (defaults to *)
return void

inherit() public method

No op method, inherit cannot be done with IniAcl
public inherit ( string $aro, string $aco, string $action = "*" ) : void
$aro string ARO The requesting object identifier.
$aco string ACO The controlled object identifier.
$action string Action (defaults to *)
return void

initialize() public method

Initialize method
public initialize ( Component $component ) : void
$component Cake\Controller\Component Component instance.
return void

readConfigFile() public method

Parses an INI file and returns an array that reflects the INI file's section structure. Double-quote friendly.
public readConfigFile ( string $filename ) : array
$filename string File
return array INI section structure

Property Details

$_defaultConfig protected property

Default config for this class
protected array $_defaultConfig
return array

$userPath public property

The Hash::extract() path to the user/aro identifier in the acl.ini file. This path will be used to extract the string representation of a user used in the ini file.
public string $userPath
return string