Drupal 8  8.0.2
ProxyBuilder Class Reference
Inheritance diagram for ProxyBuilder:

Public Member Functions

 build ($class_name, $proxy_class_name= '')
 

Static Public Member Functions

static buildProxyClassName ($class_name)
 
static buildProxyNamespace ($class_name)
 

Protected Member Functions

 buildLazyLoadItselfMethod ()
 
 buildMethod (\ReflectionMethod $reflection_method)
 
 buildParameter (\ReflectionParameter $parameter)
 
 buildMethodBody (\ReflectionMethod $reflection_method)
 
 buildConstructorMethod ()
 
 buildUseStatements ()
 

Detailed Description

Generates the string representation of the proxy service.

Member Function Documentation

build (   $class_name,
  $proxy_class_name = '' 
)

Builds a proxy class string.

Parameters
string$class_nameThe class name of the actual service.
string$proxy_class_name(optional) The class name of the proxy service.
Returns
string The full string with namespace class and methods.

References ProxyBuilder\buildConstructorMethod(), ProxyBuilder\buildLazyLoadItselfMethod(), ProxyBuilder\buildMethod(), ProxyBuilder\buildProxyClassName(), ProxyBuilder\buildProxyNamespace(), and ProxyBuilder\buildUseStatements().

Here is the call graph for this function:

buildConstructorMethod ( )
protected

Builds the constructor used to inject the actual service ID.

Returns
string

Referenced by ProxyBuilder\build().

Here is the caller graph for this function:

buildLazyLoadItselfMethod ( )
protected

Generates the string for the method which loads the actual service.

Returns
string

Referenced by ProxyBuilder\build().

Here is the caller graph for this function:

buildMethod ( \ReflectionMethod  $reflection_method)
protected

Generates the string representation of a single method: signature, body.

Parameters
\ReflectionMethod$reflection_methodA reflection method for the method.
Returns
string

References Drupal\service().

Referenced by ProxyBuilder\build().

Here is the call graph for this function:

Here is the caller graph for this function:

buildMethodBody ( \ReflectionMethod  $reflection_method)
protected

Builds the body of a wrapped method.

Parameters
\ReflectionMethod$reflection_methodA reflection method for the method.
Returns
string
buildParameter ( \ReflectionParameter  $parameter)
protected

Builds a string for a single parameter of a method.

Parameters
\ReflectionParameter$parameterA reflection object of the parameter.
Returns
string
static buildProxyClassName (   $class_name)
static

Generates the used proxy class name from a given class name.

Parameters
string$class_nameThe class name of the actual service.
Returns
string The class name of the proxy.

Referenced by ProxyBuilder\build(), and ProxyServicesPass\process().

Here is the caller graph for this function:

static buildProxyNamespace (   $class_name)
static

Generates the used proxy namespace from a given class name.

Parameters
string$class_nameThe class name of the actual service.
Returns
string The namespace name of the proxy.

Referenced by ProxyBuilder\build().

Here is the caller graph for this function:

buildUseStatements ( )
protected

Build the required use statements of the proxy class.

Returns
string

Referenced by ProxyBuilder\build().

Here is the caller graph for this function:


The documentation for this class was generated from the following file: