src/Isolate/LazyObjects/Proxy/Adapter/OcramiusProxyManager/MethodGenerator/GetLazyProperties.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use ProxyManager\Generator\MethodGenerator; |
| 6 |
|
use Zend\Code\Generator\PropertyGenerator; |
| 7 |
|
|
| 8 |
|
class GetLazyProperties extends MethodGenerator |
| 9 |
|
{ |
| 10 |
|
/** |
| 11 |
|
* Constructor |
| 12 |
|
*/ |
| 13 |
|
public function __construct(PropertyGenerator $lazyPropertiesProperty) |
| 14 |
|
{ |
| 15 |
|
parent::__construct('getLazyProperties'); |
| 16 |
|
$lazyPropertiesProperty = $lazyPropertiesProperty->getName(); |
| 17 |
|
$this->setDocblock('{@inheritDoc}'); |
| 18 |
|
|
| 19 |
|
$this->setBody("return \$this->" . $lazyPropertiesProperty . ";"); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Isolate/LazyObjects/Proxy/Adapter/OcramiusProxyManager/MethodGenerator/GetMethodReplacements.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use ProxyManager\Generator\MethodGenerator; |
| 6 |
|
use Zend\Code\Generator\PropertyGenerator; |
| 7 |
|
|
| 8 |
|
class GetMethodReplacements extends MethodGenerator |
| 9 |
|
{ |
| 10 |
|
/** |
| 11 |
|
* Constructor |
| 12 |
|
*/ |
| 13 |
|
public function __construct(PropertyGenerator $methodReplacementsProperty) |
| 14 |
|
{ |
| 15 |
|
parent::__construct('getMethodReplacements'); |
| 16 |
|
$methodReplacementsProperty = $methodReplacementsProperty->getName(); |
| 17 |
|
$this->setDocblock('{@inheritDoc}'); |
| 18 |
|
|
| 19 |
|
$this->setBody("return \$this->" . $methodReplacementsProperty . ";"); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|
src/Isolate/LazyObjects/Proxy/Adapter/OcramiusProxyManager/MethodGenerator/GetWrappedObject.php 1 location
|
@@ 8-21 (lines=14) @@
|
| 5 |
|
use ProxyManager\Generator\MethodGenerator; |
| 6 |
|
use Zend\Code\Generator\PropertyGenerator; |
| 7 |
|
|
| 8 |
|
class GetWrappedObject extends MethodGenerator |
| 9 |
|
{ |
| 10 |
|
/** |
| 11 |
|
* Constructor |
| 12 |
|
*/ |
| 13 |
|
public function __construct(PropertyGenerator $methodReplacementsProperty) |
| 14 |
|
{ |
| 15 |
|
parent::__construct('getWrappedObject'); |
| 16 |
|
$methodReplacementsProperty = $methodReplacementsProperty->getName(); |
| 17 |
|
$this->setDocblock('{@inheritDoc}'); |
| 18 |
|
|
| 19 |
|
$this->setBody("return \$this->" . $methodReplacementsProperty . ";"); |
| 20 |
|
} |
| 21 |
|
} |
| 22 |
|
|