-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging develop to master in preparation for 2.3.0 release.
- Loading branch information
Showing
5 changed files
with
91 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
/** | ||
* @see https://github.com/laminas/laminas-diactoros for the canonical source repository | ||
* @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md | ||
* @license https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Laminas\Diactoros; | ||
|
||
use Psr\Http\Message\ServerRequestFactoryInterface; | ||
use Psr\Http\Message\RequestFactoryInterface; | ||
use Psr\Http\Message\ResponseFactoryInterface; | ||
use Psr\Http\Message\StreamFactoryInterface; | ||
use Psr\Http\Message\UploadedFileFactoryInterface; | ||
use Psr\Http\Message\UriFactoryInterface; | ||
|
||
class ConfigProvider | ||
{ | ||
/** | ||
* Retrieve configuration for laminas-diactoros. | ||
* | ||
* @return array | ||
*/ | ||
public function __invoke() : array | ||
{ | ||
return [ | ||
'dependencies' => $this->getDependencies(), | ||
]; | ||
} | ||
|
||
/** | ||
* Returns the container dependencies. | ||
* Maps factory interfaces to factories. | ||
*/ | ||
public function getDependencies() : array | ||
{ | ||
return [ | ||
'invokables' => [ | ||
RequestFactoryInterface::class => RequestFactory::class, | ||
ResponseFactoryInterface::class => ResponseFactory::class, | ||
StreamFactoryInterface::class => StreamFactory::class, | ||
ServerRequestFactoryInterface::class => ServerRequestFactory::class, | ||
UploadedFileFactoryInterface::class => UploadedFileFactory::class, | ||
UriFactoryInterface::class => UriFactory::class | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
/** | ||
* @see https://github.com/laminas/laminas-diactoros for the canonical source repository | ||
* @copyright https://github.com/laminas/laminas-diactoros/blob/master/COPYRIGHT.md | ||
* @license https://github.com/laminas/laminas-diactoros/blob/master/LICENSE.md New BSD License | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Laminas\Diactoros; | ||
|
||
class Module | ||
{ | ||
public function getConfig(): array | ||
{ | ||
return [ | ||
'service_manager' => (new ConfigProvider())->getDependencies(), | ||
]; | ||
} | ||
} |