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
// Before: | |
return [ | |
'slm_queue' => [ | |
'worker' => [ | |
'max_runs' => 500 | |
], | |
'queue_manager' => [ | |
'factories' => [ |
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
class DoctrineQueueFactory implements FactoryInterface | |
{ | |
/** | |
* {@inheritDoc} | |
*/ | |
public function createService(ServiceLocatorInterface $serviceLocator, $name = '', $requestedName = '') | |
{ | |
$parentLocator = $serviceLocator->getServiceLocator(); | |
/** @var $doctrineOptions \SlmQueueDoctrine\Options\DoctrineOptions */ |
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
<?php | |
return [ | |
'slm_queue' => [ | |
'options' => [ | |
'worker' => [ | |
//worker options | |
], | |
// Configure each queues |
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
<?php | |
/** | |
* If for instance a plugin manager has the following config: | |
* | |
* [ | |
* 'invokables' => [ | |
* 'formDateSelect' => 'Zend\Form\Element\DateSelect' | |
* ] | |
* ] | |
* |
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
public function getIterator() | |
{ | |
if (version_compare(PHP_VERSION, '5.5.0') < 0) { | |
return $this; | |
} | |
foreach ($this->routes as $name => $route) { | |
$route = $this->get($name); | |
yield $route; | |
} |
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
<?php | |
$events = array(); | |
$events['event'][] = array(1 => 'e'); | |
$events['event'][] = array(1 => 'b'); | |
$toSort = $events['event']; | |
asort($toSort); | |
?> |
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
<?php | |
return array( | |
'zfc_rbac' => array( | |
'permissions' => array( | |
// Définition des providers. Exemple (syntaxe à réfléchir voir si on peut pas trouver mieux) | |
'ZfcRbac\Permission\InMemoryPermissionProvider' => array( | |
'member' => array('edit', 'read'), | |
'admin' => array('delete') |
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
'zf-content-negotiation' => array( | |
'selectors' => array( | |
'ZF\Hal\View\HalJsonModel' => array( | |
'application/json', | |
'application/*+json', | |
), | |
), | |
), |
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
<?php | |
$allowedMethods = array('options', 'put'); | |
$response->getHeaders()->addHeaderLine('Allow', implode(', ', $allowedMethods)); | |
echo $response->getHeaders()->get('Allow')->getFieldValue(); // also outputs "post" |
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
<?php | |
/** | |
* Zend Framework (http://framework.zend.com/) | |
* | |
* @link http://github.com/zendframework/zf2 for the canonical source repository | |
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | |
* @license http://framework.zend.com/license/new-bsd New BSD License | |
*/ | |
namespace Zend\Validator\Result; |