src/Container.php
protected function registerInstance($instance, array $parameters)
    {
        //Declarative singletons (only when class received via direct get)
        if (empty($parameters) && $instance instanceof SingletonInterface) {
            $alias = get_class($instance);

            if (!isset($this->bindings[$alias])) {
                $this->bindings[$alias] = $instance;
            }
        }

        //Your code can go here (for example LoggerAwareInterface, custom hydration and etc)

        return $instance;
    }
protected function registerInstance($instance, array $parameters)
    {
        //Declarative singletons (only when class received via direct get)
        if (empty($parameters) && $instance instanceof SingletonInterface) {
            $alias = get_class($instance);

            if (!isset($this->bindings[$alias])) {
                $this->bindings[$alias] = $instance;
            }
        }

        //Your code can go here (for example LoggerAwareInterface, custom hydration and etc)

        return $instance;
    }
protected function registerInstance ( $ instance , array $ parameters ) { //Declarative singletons (only when class received via direct get) if ( empty ( $ parameters ) && $ instance instanceof SingletonInterface ) { $ alias = get_class ( $ instance ) ; if ( ! isset ( $ this -> bindings [ $ alias ] ) ) { $ this -> bindings [ $ alias ] = $ instance ; } } //Your code can go here (for example LoggerAwareInterface, custom hydration and etc) return $ instance ; }
Register instance in container, might perform methods like auto-singletons, log populations
and etc. Can be extended.

@param object $instance   Created object.
@param array  $parameters Parameters which been passed with created instance.
@return object
Register instance in container might perform methods like auto - singletons log populations and etc . Can be extended .