Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 54d553e

Browse files
bakura10weierophinney
authored andcommitted
Add build method
1 parent 3cda628 commit 54d553e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/ServiceManager.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,20 @@ public function withConfig(array $config)
114114
return $container;
115115
}
116116

117+
/**
118+
* {@inheritDoc}
119+
*/
120+
public function get($name)
121+
{
122+
return $this->build($name);
123+
}
124+
117125
/**
118126
* {@inheritDoc}
119127
*
120128
* This is a highly performance sensitive method, do not modify if you have not benchmarked it carefully
121129
*/
122-
public function get($name, array $options = [])
130+
public function build($name, array $options = [])
123131
{
124132
$name = $this->resolveAlias($name);
125133

@@ -157,11 +165,6 @@ public function get($name, array $options = [])
157165
return $object;
158166
}
159167

160-
public function build($name, array $options = [])
161-
{
162-
163-
}
164-
165168
/**
166169
* {@inheritDoc}
167170
*/

test/ServiceManagerTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace ZendTest\ServiceManager;
1111

1212
use DateTime;
13-
use Prophecy\Comparator\Factory;
1413
use stdClass;
1514
use Zend\ServiceManager\Exception\ServiceNotCreatedException;
1615
use Zend\ServiceManager\Factory\FactoryInterface;

0 commit comments

Comments
 (0)