Skip to content

Commit

Permalink
Add singletonIf method to the Container
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Jul 1, 2019
1 parent a783eda commit b861bcf
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ public function bindIf($abstract, $concrete = null, $shared = false);
*/
public function singleton($abstract, $concrete = null);

/**
* Register a shared binding if it hasn't already been registered.
*
* @param string $abstract
* @param \Closure|string|null $concrete
* @return void
*/
public function singletonIf($abstract, $concrete = null);

/**
* "Extend" an abstract type in the container.
*
Expand Down

0 comments on commit b861bcf

Please sign in to comment.