Neos\Flow\Aop\JoinPointInterface::getProxy PHP Method

getProxy() public method

Returns the reference to the proxy class instance
public getProxy ( ) : Neos\Flow\ObjectManagement\Proxy\ProxyInterface
return Neos\Flow\ObjectManagement\Proxy\ProxyInterface
    public function getProxy();

Usage Example

 /**
  * Before advice, making sure we initialize before use.
  *
  * This expects $proxy->Flow_Persistence_LazyLoadingObject_thawProperties
  * to be a Closure that populates the object. That variable is unset after
  * initializing the object!
  *
  * @param JoinPointInterface $joinPoint The current join point
  * @return void
  * @Flow\Before("Neos\Flow\Persistence\Generic\Aspect\LazyLoadingObjectAspect->needsLazyLoadingObjectAspect && !method(.*->__construct())")
  */
 public function initialize(JoinPointInterface $joinPoint)
 {
     $proxy = $joinPoint->getProxy();
     if (property_exists($proxy, 'Flow_Persistence_LazyLoadingObject_thawProperties') && $proxy->Flow_Persistence_LazyLoadingObject_thawProperties instanceof \Closure) {
         $proxy->Flow_Persistence_LazyLoadingObject_thawProperties->__invoke($proxy);
         unset($proxy->Flow_Persistence_LazyLoadingObject_thawProperties);
     }
 }
All Usage Examples Of Neos\Flow\Aop\JoinPointInterface::getProxy