UserFrosting API

ParserNodeFunctionEvaluator extends NodeVisitorAbstract

ParserNodeFunctionEvaluator class.

This class parses access control condition expressions.

Tags
author

Alex Weissman (https://alexanderweissman.com)

see
http://www.userfrosting.com/components/#authorization

Table of Contents

$callbacks
$prettyPrinter Standard
$params array
$logger Logger
$debug bool
__construct() Create a new ParserNodeFunctionEvaluator object. mixed
leaveNode() mixed
setParams() Set params. mixed
resolveArray() Resolve an array expression in a condition expression into an actual array. mixed
resolveParamPath() Resolve a parameter path (e.g. "user.id", "post", etc) into its value. mixed

Properties

Methods

__construct()

Create a new ParserNodeFunctionEvaluator object.

public __construct( $callbacks : array , $logger : Logger [, $debug : bool = false ] ) : mixed
Parameters
$callbacks : array

The parameters to be used when evaluating the methods in the condition expression, as an array.

$logger : Logger

A Monolog logger, used to dump debugging info for authorization evaluations.

$debug : bool = false

Set to true if you want debugging information printed to the auth log.

Return values
mixed

resolveArray()

Resolve an array expression in a condition expression into an actual array.

private resolveArray( $arg : string ) : mixed
Parameters
$arg : string

the array, represented as a string.

Return values
mixed

resolveParamPath()

Resolve a parameter path (e.g. "user.id", "post", etc) into its value.

private resolveParamPath( $path : string ) : mixed
Parameters
$path : string

the name of the parameter to resolve, based on the parameters set in this object.

Tags
throws
Exception

the path could not be resolved. Path is malformed or key does not exist.

Return values
mixed

the value of the specified parameter.

Search results