public function build(Container $parent = null): Objects
    {
        $container = new Objects($this->providers, $parent);
        if (!empty($this->eager)) {
            foreach ($this->eager as $v) {
                $container->get($v);
            }
        }
        $this->providers = [];
        $this->eager = [];
        return $container;
    }
public function build(Container $parent = null): Objects
    {
        $container = new Objects($this->providers, $parent);
        if (!empty($this->eager)) {
            foreach ($this->eager as $v) {
                $container->get($v);
            }
        }
        $this->providers = [];
        $this->eager = [];
        return $container;
    }
public function build ( Container $ parent = null ) : Objects { $ container = new Objects ( $ this -> providers , $ parent ) ; if ( ! empty ( $ this -> eager ) ) { foreach ( $ this -> eager as $ v ) { $ container -> get ( $ v ) ; } } $ this -> providers = [ ] ; $ this -> eager = [ ] ; return $ container ; }
Builds a container using the settings called.

Any *eager* components will be instantiated at this time.

When this method is called, this builder is reset to its default state.

@param Container $parent An optional parent container
@return Objects The constructed `Objects` container
Builds a container using the settings called .