Module/WorkerClass.php
private function createJobCollection(ReflectionClass $reflectionClass, Reader $reader)
    {
        $jobCollection = new JobCollection;

        /**
         * For each defined method, we parse it
         */
        foreach ($reflectionClass->getMethods() as $reflectionMethod) {

            $methodAnnotations = $reader->getMethodAnnotations($reflectionMethod);

            /**
             * Every annotation found is parsed
             */
            foreach ($methodAnnotations as $methodAnnotation) {

                /**
                 * Annotation is only loaded if is typeof JobAnnotation
                 */
                if ($methodAnnotation instanceof JobAnnotation) {
                    /**
                     * Creates new Job
                     */
                    $job = new Job($methodAnnotation, $reflectionMethod, $this->callableName, $this->servers, array(
                        'jobPrefix'            => $this->jobPrefix,
                        'iterations'           => $this->iterations,
                        'method'               => $this->defaultMethod,
                        'minimumExecutionTime' => $this->minimumExecutionTime,
                        'timeout'              => $this->timeout,
                    ));

                    $jobCollection->add($job);
                }
            }
        }

        return $jobCollection;
    }
private function createJobCollection(ReflectionClass $reflectionClass, Reader $reader)
    {
        $jobCollection = new JobCollection;

        /**
         * For each defined method, we parse it
         */
        foreach ($reflectionClass->getMethods() as $reflectionMethod) {

            $methodAnnotations = $reader->getMethodAnnotations($reflectionMethod);

            /**
             * Every annotation found is parsed
             */
            foreach ($methodAnnotations as $methodAnnotation) {

                /**
                 * Annotation is only loaded if is typeof JobAnnotation
                 */
                if ($methodAnnotation instanceof JobAnnotation) {
                    /**
                     * Creates new Job
                     */
                    $job = new Job($methodAnnotation, $reflectionMethod, $this->callableName, $this->servers, array(
                        'jobPrefix'            => $this->jobPrefix,
                        'iterations'           => $this->iterations,
                        'method'               => $this->defaultMethod,
                        'minimumExecutionTime' => $this->minimumExecutionTime,
                        'timeout'              => $this->timeout,
                    ));

                    $jobCollection->add($job);
                }
            }
        }

        return $jobCollection;
    }
private function createJobCollection ( ReflectionClass $ reflectionClass , Reader $ reader ) { $ jobCollection = new JobCollection ; /**
         * For each defined method, we parse it
         */ foreach ( $ reflectionClass -> getMethods ( ) as $ reflectionMethod ) { $ methodAnnotations = $ reader -> getMethodAnnotations ( $ reflectionMethod ) ; /**
             * Every annotation found is parsed
             */ foreach ( $ methodAnnotations as $ methodAnnotation ) { /**
                 * Annotation is only loaded if is typeof JobAnnotation
                 */ if ( $ methodAnnotation instanceof JobAnnotation ) { /**
                     * Creates new Job
                     */ $ job = new Job ( $ methodAnnotation , $ reflectionMethod , $ this -> callableName , $ this -> servers , array ( 'jobPrefix' => $ this -> jobPrefix , 'iterations' => $ this -> iterations , 'method' => $ this -> defaultMethod , 'minimumExecutionTime' => $ this -> minimumExecutionTime , 'timeout' => $ this -> timeout , ) ) ; $ jobCollection -> add ( $ job ) ; } } } return $ jobCollection ; }
Creates job collection of worker

@param ReflectionClass $reflectionClass Reflexion class
@param Reader          $reader          ReaderAnnotation class

@return WorkerClass self Object
Creates job collection of worker