public function setComponent($component, $config = array())
    {
        if (! ($component instanceof LibBaseControllerAbstract)) {

            if (is_string($component) && strpos($component, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->package = $component;
            } else {
                $identifier = $this->getIdentifier($component);
            }

            $component = $identifier;
        }

        $this->setController($component, $config);

        return $this;
    }
public function setComponent($component, $config = array())
    {
        if (! ($component instanceof LibBaseControllerAbstract)) {

            if (is_string($component) && strpos($component, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->package = $component;
            } else {
                $identifier = $this->getIdentifier($component);
            }

            $component = $identifier;
        }

        $this->setController($component, $config);

        return $this;
    }
public function setComponent ( $ component , $ config = array ( ) ) { if ( ! ( $ component instanceof LibBaseControllerAbstract ) ) { if ( is_string ( $ component ) && strpos ( $ component , '.' ) === false ) { $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> package = $ component ; } else { $ identifier = $ this -> getIdentifier ( $ component ) ; } $ component = $ identifier ; } $ this -> setController ( $ component , $ config ) ; return $ this ; }
Method to set a dispatcher object.

@param mixed $component An object that implements ControllerInterface, ServiceIdentifier object
or valid identifier string

@return ComApplicationDispatcher
Method to set a dispatcher object .