protected function buildWithoutDefinition($id, array $config = [])
    {
        if (isset($config['__class'])) {
            return $this->buildFromConfig($id, $config);
        }

        if ($this->parent !== null) {
            return $this->parent->build($id, $config);
        }

        if (class_exists($id)) {
            $config['__class'] = $id;
            return $this->buildFromConfig($id, $config);
        }

        throw new NotFoundException("No definition for \"$id\" found");
    }
protected function buildWithoutDefinition($id, array $config = [])
    {
        if (isset($config['__class'])) {
            return $this->buildFromConfig($id, $config);
        }

        if ($this->parent !== null) {
            return $this->parent->build($id, $config);
        }

        if (class_exists($id)) {
            $config['__class'] = $id;
            return $this->buildFromConfig($id, $config);
        }

        throw new NotFoundException("No definition for \"$id\" found");
    }
protected function buildWithoutDefinition ( $ id , array $ config = [ ] ) { if ( isset ( $ config [ '__class' ] ) ) { return $ this -> buildFromConfig ( $ id , $ config ) ; } if ( $ this -> parent !== null ) { return $ this -> parent -> build ( $ id , $ config ) ; } if ( class_exists ( $ id ) ) { $ config [ '__class' ] = $ id ; return $ this -> buildFromConfig ( $ id , $ config ) ; } throw new NotFoundException ( "No definition for \"$id\" found" ) ; }
Creates new instance without definition in container.

@param string $id the interface name or an alias name (e.g. `foo`) that was previously registered via [[set()]].
@param array $config
@return object new built instance
@throws CircularReferenceException
@throws InvalidConfigException
@throws NotFoundException
@throws NotInstantiableException
Creates new instance without definition in container .