-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Aleksandar
committed
Apr 24, 2017
1 parent
34d6533
commit efa56c4
Showing
3 changed files
with
65 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* Expressive programmatic pipeline configuration | ||
*/ | ||
|
||
use Zend\Expressive\Container\ErrorHandlerFactory; | ||
use Zend\Expressive\Container\ErrorResponseGeneratorFactory; | ||
use Zend\Expressive\Container\NotFoundDelegateFactory; | ||
use Zend\Expressive\Container\NotFoundHandlerFactory; | ||
use Zend\Expressive\Delegate\NotFoundDelegate; | ||
use Zend\Expressive\Middleware\ErrorResponseGenerator; | ||
use Zend\Expressive\Middleware\ImplicitHeadMiddleware; | ||
use Zend\Expressive\Middleware\ImplicitOptionsMiddleware; | ||
use Zend\Expressive\Middleware\NotFoundHandler; | ||
use Zend\Stratigility\Middleware\ErrorHandler; | ||
use Zend\Stratigility\Middleware\OriginalMessages; | ||
|
||
return [ | ||
'dependencies' => [ | ||
'aliases' => [ | ||
// Override the following to provide an alternate default delegate. | ||
'Zend\Expressive\Delegate\DefaultDelegate' => NotFoundDelegate::class, | ||
], | ||
'invokables' => [ | ||
ImplicitHeadMiddleware::class => ImplicitHeadMiddleware::class, | ||
ImplicitOptionsMiddleware::class => ImplicitOptionsMiddleware::class, | ||
OriginalMessages::class => OriginalMessages::class, | ||
], | ||
'factories' => [ | ||
ErrorHandler::class => ErrorHandlerFactory::class, | ||
// Override the following in a local config file to use | ||
// Zend\Expressive\Container\WhoopsErrorResponseGeneratorFactory | ||
// in order to use Whoops for development error handling. | ||
ErrorResponseGenerator::class => ErrorResponseGeneratorFactory::class, | ||
// Override the following to use an alternate "not found" delegate. | ||
NotFoundDelegate::class => NotFoundDelegateFactory::class, | ||
NotFoundHandler::class => NotFoundHandlerFactory::class, | ||
], | ||
], | ||
'zend-expressive' => [ | ||
'programmatic_pipeline' => false, | ||
'raise_throwables' => true, | ||
], | ||
]; |
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