src/IronWorker.php
public function cancelTask($task_id)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/cancel";
        $request = array();

        $this->setCommonHeaders();
        $res = $this->apiCall(self::POST, $url, $request);
        return self::json_decode($res);
    }
public function cancelTask($task_id)
    {
        if (empty($task_id)) {
            throw new \InvalidArgumentException("Please set task_id");
        }
        $url = "projects/{$this->project_id}/tasks/$task_id/cancel";
        $request = array();

        $this->setCommonHeaders();
        $res = $this->apiCall(self::POST, $url, $request);
        return self::json_decode($res);
    }
public function cancelTask ( $ task_id ) { if ( empty ( $ task_id ) ) { throw new \ InvalidArgumentException ( "Please set task_id" ) ; } $ url = "projects/{$this->project_id}/tasks/$task_id/cancel" ; $ request = array ( ) ; $ this -> setCommonHeaders ( ) ; $ res = $ this -> apiCall ( self :: POST , $ url , $ request ) ; return self :: json_decode ( $ res ) ; }
Cancels task.

@param string $task_id Task ID
@return mixed
@throws \InvalidArgumentException
Cancels task .