Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Commit

Permalink
Add two new methods and rename the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinalkan committed Apr 17, 2021
1 parent 4c18b36 commit e1763bb
Showing 1 changed file with 24 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
namespace Contracts;

use ArrayAccess;

interface SniccoContainerAdapter extends ArrayAccess {
use Closure;

interface ContainerAdapter extends ArrayAccess {

/**
* Resolves the given type from the container.
Expand Down Expand Up @@ -45,5 +46,25 @@ public function instance($abstract, $instance);
* @return mixed
*/
public function call ( $callable , array $parameters = [] );


/**
* Register a binding with the container.
* This will not be a singleton but a new object everytime it gets resolved.
*
* @param string $abstract
* @param Closure|string|null $concrete
* @return void
*/
public function bind( $abstract, $concrete );

/**
* Register a shared binding in the container.
* This object will be a singleton always
*
* @param string $abstract
* @param Closure|string|null $concrete
* @return void
*/
public function singleton($abstract, $concrete );

}

0 comments on commit e1763bb

Please sign in to comment.