改名
This commit is contained in:
@@ -112,8 +112,12 @@ class Container extends BaseObject implements ContainerInterface
|
||||
*/
|
||||
public function setBindings(string $interface, $object)
|
||||
{
|
||||
$this->_singletons[$interface] = $object;
|
||||
if (is_string($object)) {
|
||||
$this->_interfaces[$interface] = $object;
|
||||
} else {
|
||||
$this->_interfaces[$interface] = get_class($object);
|
||||
$this->_singletons[$interface] = $object;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user