src/base/Module.php
public function get($id, bool $throwException = true)
    {
        if (!$this->_container->has($id)) {
            if ($throwException) {
                throw new InvalidConfigException("Unknown component ID: $id");
            }
            return null;
        }

        return $this->_container->get($id);
    }
public function get($id, bool $throwException = true)
    {
        if (!$this->_container->has($id)) {
            if ($throwException) {
                throw new InvalidConfigException("Unknown component ID: $id");
            }
            return null;
        }

        return $this->_container->get($id);
    }
public function get ( $ id , bool $ throwException = true ) { if ( ! $ this -> _container -> has ( $ id ) ) { if ( $ throwException ) { throw new InvalidConfigException ( "Unknown component ID: $id" ) ; } return null ; } return $ this -> _container -> get ( $ id ) ; }
Returns instance from DI by ID.
@param string $id
@param bool $throwException
Returns instance from DI by ID .