for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Gearman Bundle for Symfony2 / Symfony3
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* Feel free to edit as you please, and have fun.
* @author Marc Morera <[email protected]>
*/
namespace Mkk\GearmanBundle\Module;
use Mkk\GearmanBundle\Module\WorkerClass as Worker;
* WorkerCollection class
class WorkerCollection
{
* All Workers
* @var array
private $workerClasses = array();
* Adds a Worker into $workerClasses
* Return self object
* @param Worker $workerClass Worker element to add
* @return WorkerCollection
public function add(Worker $workerClass)
$this->workerClasses[] = $workerClass;
return $this;
}
* Retrieve all workers loaded previously in cache format
* @return array
public function toArray()
$workersDumped = array();
foreach ($this->workerClasses as $worker) {
$workersDumped[] = $worker->toArray();
return $workersDumped;
This check marks files that end in a newline character, i.e. an empy line.
This check marks files that end in a newline character, i.e. an empy line.