protected function &getProducerForRegisteredType($registered_type)
    {
        if (empty($this->producers[$registered_type])) {
            if (empty($this->default_producer)) {
                $default_producer_class = $this->getDefaultProducerClass();

                $this->default_producer = new $default_producer_class($this->connection, $this);

                if ($this->default_producer instanceof ContainerAccessInterface && $this->hasContainer()) {
                    $this->default_producer->setContainer($this->getContainer());
                }
            }

            return $this->default_producer;
        } else {
            return $this->producers[$registered_type];
        }
    }
protected function &getProducerForRegisteredType($registered_type)
    {
        if (empty($this->producers[$registered_type])) {
            if (empty($this->default_producer)) {
                $default_producer_class = $this->getDefaultProducerClass();

                $this->default_producer = new $default_producer_class($this->connection, $this);

                if ($this->default_producer instanceof ContainerAccessInterface && $this->hasContainer()) {
                    $this->default_producer->setContainer($this->getContainer());
                }
            }

            return $this->default_producer;
        } else {
            return $this->producers[$registered_type];
        }
    }
protected function & getProducerForRegisteredType ( $ registered_type ) { if ( empty ( $ this -> producers [ $ registered_type ] ) ) { if ( empty ( $ this -> default_producer ) ) { $ default_producer_class = $ this -> getDefaultProducerClass ( ) ; $ this -> default_producer = new $ default_producer_class ( $ this -> connection , $ this ) ; if ( $ this -> default_producer instanceof ContainerAccessInterface && $ this -> hasContainer ( ) ) { $ this -> default_producer -> setContainer ( $ this -> getContainer ( ) ) ; } } return $ this -> default_producer ; } else { return $ this -> producers [ $ registered_type ] ; } }
Return producer for registered type.

@param  string            $registered_type
@return ProducerInterface
Return producer for registered type .