public function container($container = null, Closure $callback = null)
    {
        $container = is_null($container) ? $this->defaultContainer : $container;

        if (!isset($this->containers[$container])) {
            $this->addContainer(
                $container,
                $this->getContainerTypes($container),
                $this->getContainerFormat($container),
                $this->getContainerFormats($container)
            );
        }

        if (is_callable($callback)) {
            $callback($this->containers[$container]);
        }

        return $this->containers[$container];
    }
public function container($container = null, Closure $callback = null)
    {
        $container = is_null($container) ? $this->defaultContainer : $container;

        if (!isset($this->containers[$container])) {
            $this->addContainer(
                $container,
                $this->getContainerTypes($container),
                $this->getContainerFormat($container),
                $this->getContainerFormats($container)
            );
        }

        if (is_callable($callback)) {
            $callback($this->containers[$container]);
        }

        return $this->containers[$container];
    }
public function container ( $ container = null , Closure $ callback = null ) { $ container = is_null ( $ container ) ? $ this -> defaultContainer : $ container ; if ( ! isset ( $ this -> containers [ $ container ] ) ) { $ this -> addContainer ( $ container , $ this -> getContainerTypes ( $ container ) , $ this -> getContainerFormat ( $ container ) , $ this -> getContainerFormats ( $ container ) ) ; } if ( is_callable ( $ callback ) ) { $ callback ( $ this -> containers [ $ container ] ) ; } return $ this -> containers [ $ container ] ; }
Returns container instance.

@param null|string $container
@param callable $callback
@return \Krucas\Notification\NotificationsBag
Returns container instance .