Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
DI\Proxy\ProxyFactory Class Reference

Public Member Functions

 __construct (private ?string $proxyDirectory=null,)
 
 createProxy (string $className, Closure $initializer)
 Creates a new lazy proxy instance of the given class with the given initializer.
 
 generateProxyClass (string $className)
 Generates and writes the proxy class to file.
 

Constructor & Destructor Documentation

◆ __construct()

DI\Proxy\ProxyFactory::__construct ( private ?string $proxyDirectory = null)
Parameters
string | null$proxyDirectoryIf set, write the proxies to disk in this directory to improve performances.

Member Function Documentation

◆ createProxy()

DI\Proxy\ProxyFactory::createProxy ( string $className,
Closure $initializer )

Creates a new lazy proxy instance of the given class with the given initializer.

Parameters
class-string$classNamename of the class to be proxied
Closure$initializerinitializer to be passed to the proxy

◆ generateProxyClass()

DI\Proxy\ProxyFactory::generateProxyClass ( string $className)

Generates and writes the proxy class to file.

Parameters
class-string$classNamename of the class to be proxied

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