[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/ocramius/proxy-manager/src/ProxyManager/ProxyGenerator/Util/ -> PublicScopeSimulator.php (summary)

(no description)

File Size: 163 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PublicScopeSimulator:: (6 methods):
  getPublicAccessSimulationCode()
  getUndefinedPropertyNotice()
  getByRefReturnValue()
  getTargetObject()
  getOperation()
  getScopeReBind()


Class: PublicScopeSimulator  - X-Ref

Generates code necessary to simulate a fatal error in case of unauthorized
access to class members in magic methods even when in child classes and dealing
with protected members.

getPublicAccessSimulationCode(string $operationType,string $nameParameter,$valueParameter = null,PropertyGenerator $valueHolder = null,$returnPropertyName = null)   X-Ref
Generates code for simulating access to a property from the scope that is accessing a proxy.
This is done by introspecting `debug_backtrace()` and then binding a closure to the scope
of the parent caller.

param: string            $operationType      operation to execute: one of 'get', 'set', 'isset' or 'unset'
param: string            $nameParameter      name of the `name` parameter of the magic method
param: string|null       $valueParameter     name of the `value` parameter of the magic method
param: PropertyGenerator $valueHolder        name of the property containing the target object from which
param: string|null       $returnPropertyName name of the property to which we want to assign the result of

getUndefinedPropertyNotice(string $operationType, string $nameParameter)   X-Ref
This will generate code that triggers a notice if access is attempted on a non-existing property

param: string $operationType
param: string $nameParameter
return: string

getByRefReturnValue(string $operationType)   X-Ref
Defines whether the given operation produces a reference.

Note: if the object is a wrapper, the wrapped instance is accessed directly. If the object
is a ghost or the proxy has no wrapper, then an instance of the parent class is created via
on-the-fly unserialization

getTargetObject(PropertyGenerator $valueHolder = null)   X-Ref
Retrieves the logic to fetch the object on which access should be attempted

param: PropertyGenerator $valueHolder
return: string

getOperation(string $operationType, string $nameParameter, ?string $valueParameter)   X-Ref


getScopeReBind()   X-Ref
Generates code to bind operations to the parent scope

return: string



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1