Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,17 @@ class SlimRouter
/**
* Class constructor
*
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
* @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings
*
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
* @throws Exception When implementation class doesn't exists
*/
public function __construct($container = [])
public function __construct($settings = [])
{
$this->slimApp = new App($container);
$this->slimApp = new App($settings);

// middlewares requires Psr\Container\ContainerInterface
$container = $this->slimApp->getContainer();

{{#hasAuthMethods}}
$authPackage = '{{authPackage}}';
Expand Down
9 changes: 6 additions & 3 deletions samples/server/petstore/php-slim/lib/SlimRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,14 +577,17 @@ class SlimRouter
/**
* Class constructor
*
* @param ContainerInterface|array $container Either a ContainerInterface or an associative array of app settings
* @param ContainerInterface|array $settings Either a ContainerInterface or an associative array of app settings
*
* @throws InvalidArgumentException When no container is provided that implements ContainerInterface
* @throws Exception When implementation class doesn't exists
*/
public function __construct($container = [])
public function __construct($settings = [])
{
$this->slimApp = new App($container);
$this->slimApp = new App($settings);

// middlewares requires Psr\Container\ContainerInterface
$container = $this->slimApp->getContainer();

$authPackage = 'OpenAPIServer\Auth';
$basicAuthenticator = function (ServerRequestInterface &$request, TokenSearch $tokenSearch) use ($authPackage) {
Expand Down