AppserverIo\Appserver\PersistenceContainer\Doctrine\DoctrineEntityManagerProxy::__create PHP Method

__create() public static method

Factory method to create a new instance of the requested proxy implementation.
public static __create ( string $className ) : AppserverIo\RemoteMethodInvocation\RemoteObjectInterface
$className string The name of the class to create the proxy for
return AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The proxy instance
    public static function __create($className)
    {
        return new DoctrineEntityManagerProxy($className);
    }

Usage Example

 /**
  * Runs a lookup on the container for the class with the
  * passed name.
  *
  * @param string $className The class name to run the lookup for
  *
  * @return \AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The instance
  */
 public function lookup($className)
 {
     return DoctrineEntityManagerProxy::__create($className)->__setSession($this->__getSession());
 }