PHP 클래스 Doctrine\ODM\CouchDB\Proxy\ProxyFactory

저자: Roman Borschel ([email protected])
저자: Giorgio Sironi ([email protected])
파일 보기 프로젝트 열기: doctrine/couchdb-odm 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( DocumentManager $dm, string $proxyDir, string $proxyNs, boolean $autoGenerate = false ) Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager.
generateProxyClasses ( array $classes, string $toDir = null ) Generates proxy classes for all given classes.
getProxy ( string $className, mixed $identifier ) : object Gets a reference proxy instance for the entity of the given type and identified by the given identifier.

비공개 메소드들

메소드 설명
generateMethods ( ClassMetadata $class ) : string Generates the methods of a proxy class.
generateProxyClass ( $class, $fileName, $template ) Generates a proxy class file.
generateSleep ( ClassMetadata $class ) : string Generates the code for the __sleep method for a proxy class.
getProxyFileName ( string $className, string $baseDir = null ) : string Generate the Proxy file name

메소드 상세

__construct() 공개 메소드

Initializes a new instance of the ProxyFactory class that is connected to the given DocumentManager.
public __construct ( DocumentManager $dm, string $proxyDir, string $proxyNs, boolean $autoGenerate = false )
$dm Doctrine\ODM\CouchDB\DocumentManager The DocumentManager the new factory works for.
$proxyDir string The directory to use for the proxy classes. It must exist.
$proxyNs string The namespace to use for the proxy classes.
$autoGenerate boolean Whether to automatically generate proxy classes.

generateProxyClasses() 공개 메소드

Generates proxy classes for all given classes.
public generateProxyClasses ( array $classes, string $toDir = null )
$classes array The classes (ClassMetadata instances) for which to generate proxies.
$toDir string The target directory of the proxy classes. If not specified, the directory configured on the Configuration of the DocumentManager used by this factory is used.

getProxy() 공개 메소드

Gets a reference proxy instance for the entity of the given type and identified by the given identifier.
public getProxy ( string $className, mixed $identifier ) : object
$className string
$identifier mixed
리턴 object