Check that we have a Slim container
This commit is contained in:
parent
41b9be34c5
commit
3a31cc0008
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,7 @@ namespace Alltube\Controller;
|
||||||
use Alltube\Config;
|
use Alltube\Config;
|
||||||
use Alltube\VideoDownload;
|
use Alltube\VideoDownload;
|
||||||
use Interop\Container\ContainerInterface;
|
use Interop\Container\ContainerInterface;
|
||||||
|
use Slim\Container;
|
||||||
use Slim\Http\Request;
|
use Slim\Http\Request;
|
||||||
use Slim\Http\Response;
|
use Slim\Http\Response;
|
||||||
use Slim\Http\Stream;
|
use Slim\Http\Stream;
|
||||||
|
@ -46,8 +47,10 @@ class FrontController
|
||||||
{
|
{
|
||||||
$this->config = Config::getInstance();
|
$this->config = Config::getInstance();
|
||||||
$this->download = new VideoDownload();
|
$this->download = new VideoDownload();
|
||||||
|
if ($container instanceof Container) {
|
||||||
$this->container = $container;
|
$this->container = $container;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display index page.
|
* Display index page.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue