This repository has been archived by the owner on Feb 6, 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.
Merging develop to master in preparation for 2.4.0rc1.
- Loading branch information
29 parents
c1af016
+
181295d
+
98b335b
+
599b863
+
0c02be7
+
0768225
+
e173fb3
+
ced2213
+
fc40746
+
a5d9cef
+
aeb4704
+
1b0cc8f
+
5c7faf9
+
9c50ec8
+
008d34b
+
9b87f39
+
795eee4
+
1b54c83
+
4f01722
+
873b36f
+
3d93700
+
c0cf550
+
9137eae
+
805b560
+
7b787f7
+
f603011
+
60f6978
+
de612ba
+
3979e15
commit 7a49640
Showing
10 changed files
with
465 additions
and
40 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,50 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\ServiceManager\Exception; | ||
|
||
use Exception as BaseException; | ||
use Zend\ServiceManager\AbstractPluginManager; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class ServiceLocatorUsageException extends ServiceNotFoundException | ||
{ | ||
/** | ||
* Static constructor | ||
* | ||
* @param AbstractPluginManager $pluginManager | ||
* @param ServiceLocatorInterface $parentLocator | ||
* @param string $serviceName | ||
* @param BaseException $previousException | ||
* | ||
* @return self | ||
*/ | ||
public static function fromInvalidPluginManagerRequestedServiceName( | ||
AbstractPluginManager $pluginManager, | ||
ServiceLocatorInterface $parentLocator, | ||
$serviceName, | ||
BaseException $previousException | ||
) { | ||
return new self( | ||
sprintf( | ||
"Service \"%s\" has been requested to plugin manager of type \"%s\", but couldn't be retrieved.\n" | ||
. "A previous exception of type \"%s\" has been raised in the process.\n" | ||
. "By the way, a service with the name \"%s\" has been found in the parent service locator \"%s\": " | ||
. 'did you forget to use $parentLocator = $serviceLocator->getServiceLocator() in your factory code?', | ||
$serviceName, | ||
get_class($pluginManager), | ||
get_class($previousException), | ||
$serviceName, | ||
get_class($parentLocator) | ||
), | ||
0, | ||
$previousException | ||
); | ||
} | ||
} |
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,42 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\ServiceManager; | ||
|
||
/** | ||
* Trait for MutableCreationOptions Factories | ||
*/ | ||
trait MutableCreationOptionsTrait | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
protected $creationOptions = array(); | ||
|
||
/** | ||
* Set creation options | ||
* | ||
* @param array $creationOptions | ||
* @return void | ||
*/ | ||
public function setCreationOptions(array $creationOptions) | ||
{ | ||
$this->creationOptions = $creationOptions; | ||
} | ||
|
||
/** | ||
* Get creation options | ||
* | ||
* @return array | ||
*/ | ||
public function getCreationOptions() | ||
{ | ||
return $this->creationOptions; | ||
} | ||
} |
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
Oops, something went wrong.