Skip to content

Commit

Permalink
add __invoke
Browse files Browse the repository at this point in the history
Add `__invoke`, per discussion here: container-interop#53 (comment)
  • Loading branch information
mindplay-dk authored Mar 17, 2021
1 parent 71b5913 commit e4b832e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ServiceInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ interface ServiceInterface
* @return string[] A list of strings each representing the key of a service.
*/
public function getDependencies(): array;

/**
* Creates the entry, using the given container to resolve dependencies.
*
* @param ContainerInterface $container The container that should be used to resolve dependencies
*
* @return mixed The created entry
*/
public function __invoke(ContainerInterface $container);
}

0 comments on commit e4b832e

Please sign in to comment.