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

Commit

Permalink
Merge branch 'hotfix/90' into develop
Browse files Browse the repository at this point in the history
Forward port #90
  • Loading branch information
weierophinney committed Feb 1, 2016
2 parents 0105775 + 0a371ad commit 2b301eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- Nothing.
- [#90](https://github.com/zendframework/zend-servicemanager/pull/90) fixes
several examples in the configuration chapter of the documentation, ensuring
that the signatures are correct.

## 3.0.2 - 2016-01-24

Expand Down
8 changes: 4 additions & 4 deletions doc/book/configuring-the-service-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ closure. This leads to more readable code. For instance:

class MyObjectFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName)
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$dependency = $container->get(stdClass::class);
return new MyObject($dependency);
Expand Down Expand Up @@ -123,7 +123,7 @@ For instance, if two services share the same creation pattern, you could attach

class MyObjectFactory implements FactoryInterface
{
public function __invoke(ContainerInterface $container, $requestedName)
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
$dependency = $container->get(stdClass::class);
return new $requestedName($dependency);
Expand Down Expand Up @@ -175,7 +175,7 @@ class MyAbstractFactory implements AbstractFactoryInterface
return in_array('Traversable', class_implements($requestedName), true);
}

public function __invoke(ContainerInterface $container, $requestedName)
public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
{
return $requestedName();
}
Expand Down Expand Up @@ -292,7 +292,7 @@ Alternately, you can create a class that implements

class MyInitializer implements InitializerInterface
{
public function __invoke(ServiceLocatorInterface $serviceLocator, $instance)
public function __invoke(ContainerInterface $container, $instance)
{
if (! $instance instanceof EventManagerAwareInterface) {
return;
Expand Down

0 comments on commit 2b301eb

Please sign in to comment.