SecurityPolicy
in package
implements
SecurityPolicyInterface
SecurityPolicy globally blocks accessibility of certain methods and properties.
Tags
Interfaces, Classes and Traits
- SecurityPolicyInterface
- Interface that all security policy classes must implements.
Table of Contents
- $blockedMethods : array<string|int, mixed>
- __construct() : mixed
- Constructor
- checkMethodAllowed() : mixed
- Checks if a given method is allowed to be called on a given object
- checkPropertyAllowed() : mixed
- Checks if a given property is permitted to be accessed on a given object
- checkSecurity() : mixed
- Check the provided arguments against this security policy
Properties
$blockedMethods
protected
array<string|int, mixed>
$blockedMethods
= ['addDynamicMethod', 'addDynamicProperty', 'bindEvent', 'bindEventOnce']
List of forbidden methods.
Methods
__construct()
Constructor
public
__construct() : mixed
Return values
mixed —checkMethodAllowed()
Checks if a given method is allowed to be called on a given object
public
checkMethodAllowed(object $obj, string $method) : mixed
Parameters
- $obj : object
- $method : string
Tags
Return values
mixed —checkPropertyAllowed()
Checks if a given property is permitted to be accessed on a given object
public
checkPropertyAllowed(object $obj, string $property) : mixed
Parameters
- $obj : object
- $property : string
Tags
Return values
mixed —checkSecurity()
Check the provided arguments against this security policy
public
checkSecurity(array<string|int, mixed> $tags, array<string|int, mixed> $filters, array<string|int, mixed> $functions) : mixed
Parameters
- $tags : array<string|int, mixed>
-
Array of tags to be checked against the policy ['tag', 'tag2', 'etc']
- $filters : array<string|int, mixed>
-
Array of filters to be checked against the policy ['filter', 'filter2', 'etc']
- $functions : array<string|int, mixed>
-
Array of funtions to be checked against the policy ['function', 'function2', 'etc']