source/MethodBodyBuilder/FetchFromFactoryInstancePoolBuilder.php 1 location
|
@@ 15-31 (lines=17) @@
|
12 |
|
* Class FetchFromFactoryInstancePoolBuilder |
13 |
|
* @package Net\Bazzline\Component\Locator\MethodBodyBuilder |
14 |
|
*/ |
15 |
|
class FetchFromFactoryInstancePoolBuilder extends AbstractMethodBodyBuilder |
16 |
|
{ |
17 |
|
/** |
18 |
|
* @param BlockGenerator $body |
19 |
|
* @return BlockGenerator |
20 |
|
* @throws RuntimeException |
21 |
|
*/ |
22 |
|
public function build(BlockGenerator $body) |
23 |
|
{ |
24 |
|
$this->assertMandatoryProperties(); |
25 |
|
|
26 |
|
$body |
27 |
|
->add('return $this->fetchFromFactoryInstancePool(\'' . $this->instance->getClassName() . '\')->create();'); |
28 |
|
|
29 |
|
return $body; |
30 |
|
} |
31 |
|
} |
source/MethodBodyBuilder/FetchFromSharedInstancePoolBuilder.php 1 location
|
@@ 15-31 (lines=17) @@
|
12 |
|
* Class FetchFromSharedInstancePoolBuilder |
13 |
|
* @package Net\Bazzline\Component\Locator\MethodBodyBuilder |
14 |
|
*/ |
15 |
|
class FetchFromSharedInstancePoolBuilder extends AbstractMethodBodyBuilder |
16 |
|
{ |
17 |
|
/** |
18 |
|
* @param BlockGenerator $body |
19 |
|
* @return BlockGenerator |
20 |
|
* @throws RuntimeException |
21 |
|
*/ |
22 |
|
public function build(BlockGenerator $body) |
23 |
|
{ |
24 |
|
$this->assertMandatoryProperties(); |
25 |
|
|
26 |
|
$body |
27 |
|
->add('return $this->fetchFromSharedInstancePool(\'' . $this->instance->getClassName() . '\');'); |
28 |
|
|
29 |
|
return $body; |
30 |
|
} |
31 |
|
} |
source/MethodBodyBuilder/NewInstanceBuilder.php 1 location
|
@@ 15-31 (lines=17) @@
|
12 |
|
* Class NewInstanceBuilder |
13 |
|
* @package Net\Bazzline\Component\Locator\MethodBodyBuilder |
14 |
|
*/ |
15 |
|
class NewInstanceBuilder extends AbstractMethodBodyBuilder |
16 |
|
{ |
17 |
|
/** |
18 |
|
* @param BlockGenerator $body |
19 |
|
* @return BlockGenerator |
20 |
|
* @throws RuntimeException |
21 |
|
*/ |
22 |
|
public function build(BlockGenerator $body) |
23 |
|
{ |
24 |
|
$this->assertMandatoryProperties(); |
25 |
|
|
26 |
|
$body |
27 |
|
->add('return new ' . $this->instance->getClassName() . '();'); |
28 |
|
|
29 |
|
return $body; |
30 |
|
} |
31 |
|
} |
source/MethodBodyBuilder/PropelQueryCreateBuilder.php 1 location
|
@@ 15-30 (lines=16) @@
|
12 |
|
* Class PropelQueryCreateBuilder |
13 |
|
* @package Net\Bazzline\Component\Locator\MethodBodyBuilder |
14 |
|
*/ |
15 |
|
class PropelQueryCreateBuilder extends AbstractMethodBodyBuilder |
16 |
|
{ |
17 |
|
/** |
18 |
|
* @param BlockGenerator $body |
19 |
|
* @return BlockGenerator |
20 |
|
* @throws RuntimeException |
21 |
|
*/ |
22 |
|
public function build(BlockGenerator $body) |
23 |
|
{ |
24 |
|
$this->assertMandatoryProperties(); |
25 |
|
|
26 |
|
$body->add('return ' . $this->instance->getClassName() . '::create();'); |
27 |
|
|
28 |
|
return $body; |
29 |
|
} |
30 |
|
} |