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
Showing
15 changed files
with
69 additions
and
125 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
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
<?php | ||
namespace SvImages\Options\Factory; | ||
|
||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
use Psr\Container\ContainerInterface; | ||
use SvImages\Options\ModuleOptions; | ||
|
||
/** | ||
* @author Vytautas Stankus <svycka@gmail.com> | ||
* @license MIT | ||
*/ | ||
class ModuleOptionsFactory implements FactoryInterface | ||
class ModuleOptionsFactory | ||
{ | ||
public function createService(ServiceLocatorInterface $serviceLocator) | ||
public function __invoke(ContainerInterface $container) | ||
{ | ||
return new ModuleOptions($serviceLocator->get('Config')['sv_images']); | ||
return new ModuleOptions($container->get('Config')['sv_images']); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,38 +1,18 @@ | ||
<?php | ||
namespace SvImages\Router\Factory; | ||
|
||
use Interop\Container\ContainerInterface; | ||
use SvImages\Router\ImageRoute; | ||
use Zend\ServiceManager\FactoryInterface; | ||
use Zend\ServiceManager\MutableCreationOptionsInterface; | ||
use Zend\ServiceManager\ServiceLocatorInterface; | ||
use Zend\ServiceManager\Factory\FactoryInterface; | ||
|
||
/** | ||
* @author Vytautas Stankus <svycka@gmail.com> | ||
* @license MIT | ||
*/ | ||
class RouteFactory implements FactoryInterface, MutableCreationOptionsInterface | ||
class RouteFactory implements FactoryInterface | ||
{ | ||
/** | ||
* Options to use when creating an instance | ||
* | ||
* @var array | ||
*/ | ||
protected $creationOptions = []; | ||
|
||
public function createService(ServiceLocatorInterface $serviceLocator, $cName = null, $rName = null) | ||
{ | ||
return new ImageRoute($this->creationOptions); | ||
} | ||
|
||
/** | ||
* Set creation options | ||
* | ||
* @param array $options | ||
* | ||
* @return void | ||
*/ | ||
public function setCreationOptions(array $options) | ||
public function __invoke(ContainerInterface $container, $requestedName, array $options = null) | ||
{ | ||
$this->creationOptions = $options; | ||
return new ImageRoute($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
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
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.