public function set($name, $definition, $shared = false)
    {
        /** @var $widget \Phalcon\DI\Service */
        $widget = $this->getDI()->get('\Phalcon\DI\Service', [$name, $definition, $shared]);
        $this->_widgets[$name] = $widget;

        return $this;
    }
public function set($name, $definition, $shared = false)
    {
        /** @var $widget \Phalcon\DI\Service */
        $widget = $this->getDI()->get('\Phalcon\DI\Service', [$name, $definition, $shared]);
        $this->_widgets[$name] = $widget;

        return $this;
    }
public function set ( $ name , $ definition , $ shared = false ) { /** @var $widget \Phalcon\DI\Service */ $ widget = $ this -> getDI ( ) -> get ( '\Phalcon\DI\Service' , [ $ name , $ definition , $ shared ] ) ; $ this -> _widgets [ $ name ] = $ widget ; return $ this ; }
Registers a widget in the container

@param string $name
@param string|array|\Closure $definition
@param bool $shared

@return $this

@see \Phalcon\DI\Service
Registers a widget in the container