This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Defines get($name, array $params = null) - ServiceLocation and DependencyInjection now extend this
- Loading branch information
Showing
3 changed files
with
17 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
namespace Zend\Di; | ||
|
||
interface Locator | ||
{ | ||
/** | ||
* Retrieve a class instance | ||
* | ||
* @param string $name Class name or service name | ||
* @param null|array $params Parameters to be used when instantiating a new instance of $name | ||
* @return object|null | ||
*/ | ||
public function get($name, array $params = null); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
<?php | ||
namespace Zend\Di; | ||
|
||
interface ServiceLocation | ||
interface ServiceLocation extends Locator | ||
{ | ||
public function set($name, $service); | ||
public function get($name, array $params = null); | ||
} |