protected function registerInstance($key, $name, $interface)
    {
        if (is_a($name, $interface, true)) {
            $instances = $this->getOption($key);
            if ($instances === null || array_search($name, $instances) === false) {
                $instances[] = $name;
                $this->setOption($key, $instances);
                $this->registerMetadataService();
            }
        }
    }
protected function registerInstance($key, $name, $interface)
    {
        if (is_a($name, $interface, true)) {
            $instances = $this->getOption($key);
            if ($instances === null || array_search($name, $instances) === false) {
                $instances[] = $name;
                $this->setOption($key, $instances);
                $this->registerMetadataService();
            }
        }
    }
protected function registerInstance ( $ key , $ name , $ interface ) { if ( is_a ( $ name , $ interface , true ) ) { $ instances = $ this -> getOption ( $ key ) ; if ( $ instances === null || array_search ( $ name , $ instances ) === false ) { $ instances [ ] = $ name ; $ this -> setOption ( $ key , $ instances ) ; $ this -> registerMetadataService ( ) ; } } }
Register an instance

Register a $name instance into $key config
$key class has to implements $interface

@param $key
@param $name
@param $interface
Register an instance