This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/217' into develop
- Loading branch information
Showing
10 changed files
with
522 additions
and
24 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Mvc\Exception; | ||
|
||
final class InvalidMiddlewareException extends RuntimeException | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
private $middlewareName; | ||
|
||
/** | ||
* @param string $middlewareName | ||
* @return self | ||
*/ | ||
public static function fromMiddlewareName($middlewareName) | ||
{ | ||
$middlewareName = (string)$middlewareName; | ||
$instance = new self(sprintf('Cannot dispatch middleware %s', $middlewareName)); | ||
$instance->middlewareName = $middlewareName; | ||
return $instance; | ||
} | ||
|
||
public static function fromNull() | ||
{ | ||
$instance = new self('Middleware name cannot be null'); | ||
return $instance; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function toMiddlewareName() | ||
{ | ||
return null !== $this->middlewareName ? $this->middlewareName : ''; | ||
} | ||
} |
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 | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2017 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\Mvc\Exception; | ||
|
||
class ReachedFinalHandlerException extends RuntimeException | ||
{ | ||
/** | ||
* @return self | ||
*/ | ||
public static function create() | ||
{ | ||
return new self('Reached the final handler for middleware pipe - check the pipe configuration'); | ||
} | ||
} |
Oops, something went wrong.