PHP Класс Neos\Flow\ObjectManagement\Proxy\ProxyMethod

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$methodBody string

Защищенные свойства (Protected)

Свойство Тип Описание
$addedPostParentCallCode string
$addedPreParentCallCode string
$fullOriginalClassName string Fully qualified class name of the original class
$methodName string Name of the original method
$methodParametersCode string
$reflectionService Neos\Flow\Reflection\ReflectionService
$visibility string Visibility of the method

Открытые методы

Метод Описание
__construct ( string $fullOriginalClassName, string $methodName ) Constructor
addPostParentCallCode ( string $code ) : void Adds PHP code to the body of this method which will be executed after a possible parent call.
addPreParentCallCode ( string $code ) : void Adds PHP code to the body of this method which will be executed before a possible parent call.
buildMethodParametersCode ( string $fullClassName, string $methodName, boolean $addTypeAndDefaultValue = true ) : string Builds the PHP code for the parameters of the specified method to be used in a method interceptor in the proxy class
injectReflectionService ( ReflectionService $reflectionService ) : void Injects the Reflection Service
overrideMethodVisibility ( string $visibility ) : void Overrides the method's visibility
render ( ) : string Renders the PHP code for this Proxy Method
setMethodBody ( string $methodBody ) : void Override the method body
setMethodParametersCode ( string $code ) : void Sets the (exact) code which use used in as the parameters signature for this method.
willBeRendered ( ) : boolean Tells if enough code was provided (yet) so that this method would actually be rendered if render() is called.

Защищенные методы

Метод Описание
buildArraySetupCode ( array $array ) : string Builds a string containing PHP code to build the array given as input.
buildCallParentMethodCode ( string $fullClassName, string $methodName ) : string Builds PHP code which calls the original (ie. parent) method after the added code has been executed.
buildMethodDocumentation ( string $className, string $methodName ) : string Builds the method documentation block for the specified method keeping the vital annotations
getMethodVisibilityString ( ) : string Returns the method's visibility string found by the reflection service Note: If the reflection service has no information about this method, 'public' is returned.

Описание методов

__construct() публичный метод

Constructor
public __construct ( string $fullOriginalClassName, string $methodName )
$fullOriginalClassName string The fully qualified class name of the original class
$methodName string Name of the proxy (and original) method

addPostParentCallCode() публичный метод

Adds PHP code to the body of this method which will be executed after a possible parent call.
public addPostParentCallCode ( string $code ) : void
$code string
Результат void

addPreParentCallCode() публичный метод

Adds PHP code to the body of this method which will be executed before a possible parent call.
public addPreParentCallCode ( string $code ) : void
$code string
Результат void

buildArraySetupCode() защищенный метод

Builds a string containing PHP code to build the array given as input.
protected buildArraySetupCode ( array $array ) : string
$array array
Результат string e.g. 'array()' or 'array(1 => 'bar')

buildCallParentMethodCode() защищенный метод

Builds PHP code which calls the original (ie. parent) method after the added code has been executed.
protected buildCallParentMethodCode ( string $fullClassName, string $methodName ) : string
$fullClassName string Fully qualified name of the original class
$methodName string Name of the original method
Результат string PHP code

buildMethodDocumentation() защищенный метод

Builds the method documentation block for the specified method keeping the vital annotations
protected buildMethodDocumentation ( string $className, string $methodName ) : string
$className string Name of the class the method is declared in
$methodName string Name of the method to create the parameters code for
Результат string $methodDocumentation DocComment for the given method

buildMethodParametersCode() публичный метод

Builds the PHP code for the parameters of the specified method to be used in a method interceptor in the proxy class
public buildMethodParametersCode ( string $fullClassName, string $methodName, boolean $addTypeAndDefaultValue = true ) : string
$fullClassName string Name of the class the method is declared in
$methodName string Name of the method to create the parameters code for
$addTypeAndDefaultValue boolean If the type and default value for each parameters should be rendered
Результат string A comma speparated list of parameters

getMethodVisibilityString() защищенный метод

Returns the method's visibility string found by the reflection service Note: If the reflection service has no information about this method, 'public' is returned.
protected getMethodVisibilityString ( ) : string
Результат string One of 'public', 'protected' or 'private'

injectReflectionService() публичный метод

Injects the Reflection Service
public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
Результат void

overrideMethodVisibility() публичный метод

Overrides the method's visibility
public overrideMethodVisibility ( string $visibility ) : void
$visibility string One of 'public', 'protected', 'private'
Результат void

render() публичный метод

Renders the PHP code for this Proxy Method
public render ( ) : string
Результат string PHP code

setMethodBody() публичный метод

Override the method body
public setMethodBody ( string $methodBody ) : void
$methodBody string
Результат void

setMethodParametersCode() публичный метод

Sets the (exact) code which use used in as the parameters signature for this method.
public setMethodParametersCode ( string $code ) : void
$code string Parameters code, for example: '$foo, array $bar, \Foo\Bar\Baz $baz'
Результат void

willBeRendered() публичный метод

Tells if enough code was provided (yet) so that this method would actually be rendered if render() is called.
public willBeRendered ( ) : boolean
Результат boolean TRUE if there is any code to render, otherwise FALSE

Описание свойств

$addedPostParentCallCode защищенное свойство

protected string $addedPostParentCallCode
Результат string

$addedPreParentCallCode защищенное свойство

protected string $addedPreParentCallCode
Результат string

$fullOriginalClassName защищенное свойство

Fully qualified class name of the original class
protected string $fullOriginalClassName
Результат string

$methodBody публичное свойство

public string $methodBody
Результат string

$methodName защищенное свойство

Name of the original method
protected string $methodName
Результат string

$methodParametersCode защищенное свойство

protected string $methodParametersCode
Результат string

$reflectionService защищенное свойство

protected ReflectionService,Neos\Flow\Reflection $reflectionService
Результат Neos\Flow\Reflection\ReflectionService

$visibility защищенное свойство

Visibility of the method
protected string $visibility
Результат string