This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/2750' into develop
Forward port #2750 Conflicts: tests/ZendTest/Mvc/Controller/PluginManagerTest.php
- Loading branch information
Showing
4 changed files
with
108 additions
and
0 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
23 changes: 23 additions & 0 deletions
23
tests/ZendTest/Mvc/Controller/Plugin/TestAsset/SamplePluginFactory.php
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,23 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Mvc | ||
*/ | ||
|
||
namespace ZendTest\Mvc\Controller\Plugin\TestAsset; | ||
|
||
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class SamplePluginFactory implements FactoryInterface | ||
{ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
return new SamplePlugin(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
tests/ZendTest/Mvc/Controller/Plugin/TestAsset/SamplePluginWithConstructorFactory.php
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,30 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Mvc | ||
*/ | ||
|
||
namespace ZendTest\Mvc\Controller\Plugin\TestAsset; | ||
|
||
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
|
||
class SamplePluginWithConstructorFactory implements FactoryInterface | ||
{ | ||
protected $options; | ||
|
||
public function __construct($options) | ||
{ | ||
$this->options = $options; | ||
} | ||
|
||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
{ | ||
return new SamplePluginWithConstructor($this->options); | ||
} | ||
} |
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