# Little help needed with the containerbuilder -\[SOLVED}

**URL:** <https://discourse.slimframework.com/t/little-help-needed-with-the-containerbuilder-solved/2761>\
**Category:** Questions\
**Created:** [October 30, 2018, 8:03pm UTC](https://discourse.slimframework.com/t/little-help-needed-with-the-containerbuilder-solved/2761 "2018-10-30T20:03:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![supervan1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/supervan1/32/362_2.png) [@supervan1](https://discourse.slimframework.com/u/supervan1)\
**Post date:** [October 30, 2018, 8:03pm UTC](https://discourse.slimframework.com/t/little-help-needed-with-the-containerbuilder-solved/2761/1 "2018-10-30T20:03:51Z")

</div>

Hi,  
Im trying to add “Intervention Image” into my containerbuilder PHP-DI  
The “intervention Image “ works when I create the instance inside the controllerclass

```php
class ImageController extends BaseController
{
    public function store() {

      **//The following line of code works but I needs to be added to the containerbuilder**
      $manager = new \Intervention\Image\ImageManager();  
     //Need to call the "make" from the containerbuilder interface
       $manager->make($upload->file);
}}

```

This is my Containerbuilder

```php
namespace Ti;

use DI\Bridge\Slim\App as DIBridge;
use DI\ContainerBuilder;

class App extends DIBridge
{

    protected function configureContainer(ContainerBuilder $builder)
        {
        $builder->addDefinitions([
            'settings.displayErrorDetails' => true,
        ]);
        $builder->addDefinitions( __DIR__. '/../config/container.php');
        }

}

```

Containerbuilder addDefinitions

```php

return [RouterInterface::class => function (ContainerInterface $container)
        {
        return $container->get('router');
        },
    Twig::class => function (ContainerInterface $c)
        {
        ….
        },
    ResponseInterface::class => function (ContainerInterface $c)
        {
        ….
        },

// The problem is with the code below...Call to a member function make() on null
Image::class => function (ContainerInterface $c) 
        {
        $manager = new \Intervention\Image\ImageManager();
        $manager->configure($config->get('image'));
        return $manager;
        }

```

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [October 30, 2018, 9:06pm UTC](https://discourse.slimframework.com/t/little-help-needed-with-the-containerbuilder-solved/2761/2 "2018-10-30T21:06:16Z")

</div>

> [@supervan1](#):
>
> Image::class

Your container item id is `Image::class` but your class name is `Intervention\Image\ImageManager::class`.

Try to change the container item id to `Intervention\Image\ImageManager::class`.

```php
\Intervention\Image\ImageManager::class => function (ContainerInterface $c) {

```

---

<div class="post-metadata">

**Author:** ![supervan1](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/supervan1/32/362_2.png) [@supervan1](https://discourse.slimframework.com/u/supervan1)\
**Post date:** [October 31, 2018, 6:14am UTC](https://discourse.slimframework.com/t/little-help-needed-with-the-containerbuilder-solved/2761/3 "2018-10-31T06:14:45Z")

</div>

Thanks Odan,

this was it…working
