public function complete($result)
    {
        $this->finished = true;
        $this->result = $result;

        if (!count($this->callback[self::TASK_COMPLETE])) {
            return;
        }

        foreach ($this->callback[self::TASK_COMPLETE] as $callback) {
            call_user_func($callback, $this->func, $this->handle, $result);
        }
    }
public function complete($result)
    {
        $this->finished = true;
        $this->result = $result;

        if (!count($this->callback[self::TASK_COMPLETE])) {
            return;
        }

        foreach ($this->callback[self::TASK_COMPLETE] as $callback) {
            call_user_func($callback, $this->func, $this->handle, $result);
        }
    }
public function complete ( $ result ) { $ this -> finished = true ; $ this -> result = $ result ; if ( ! count ( $ this -> callback [ self :: TASK_COMPLETE ] ) ) { return ; } foreach ( $ this -> callback [ self :: TASK_COMPLETE ] as $ callback ) { call_user_func ( $ callback , $ this -> func , $ this -> handle , $ result ) ; } }
Run the complete callbacks.

Complete callbacks are passed the name of the job, the handle of the
job and the result of the job (in that order).

@param object $result JSON decoded result passed back

@see \MHlavac\Gearman\Task::attachCallback()
Run the complete callbacks .