ateApi = $ateApi; $this->ateJobs = $ateJobs; } /** * @param Job $job * * @return Job|false * @throws Exception */ public function process( Job $job ) { $xliffContent = $this->ateApi->get_remote_xliff_content( $job->url ); $wpmlJobId = $this->ateJobs->apply( $xliffContent ); if ( $wpmlJobId ) { $processedJob = clone $job; $processedJob->wpmlJobId = $wpmlJobId; ReturnedJobsQueue::remove( $wpmlJobId ); return $processedJob; } return false; } }