public function eager(string $name, string $type, $factory): self
    {
        $provider = new Provider($type, $factory);
        $this->eager[] = $name;
        return $this->addProvider($name, $provider);
    }
public function eager(string $name, string $type, $factory): self
    {
        $provider = new Provider($type, $factory);
        $this->eager[] = $name;
        return $this->addProvider($name, $provider);
    }
public function eager ( string $ name , string $ type , $ factory ) : self { $ provider = new Provider ( $ type , $ factory ) ; $ this -> eager [ ] = $ name ; return $ this -> addProvider ( $ name , $ provider ) ; }
Adds a singleton component to be instantiated after the container is.

```php
$builder->eager('foobar', 'Acme\Mail\Service', function($c) {
return new \Acme\Mail\Service($c['dependency']);
});
```

@param string $name The component name
@param string $type The class name of the component
@param object $factory A `Closure` or class with an `__invoke` method to return the component
@return $this provides a fluent interface
Adds a singleton component to be instantiated after the container is .