media_id, "media_id"); } static public function Array2BatchJobResult($arr) { $batchJobResult = new BatchJobResult(); $batchJobResult->status = utils::arrayGet($arr, "status"); $batchJobResult->type = utils::arrayGet($arr, "type"); $batchJobResult->total = utils::arrayGet($arr, "total"); $batchJobResult->percentage = utils::arrayGet($arr, "percentage"); $batchJobResult->result = utils::arrayGet($arr, "result"); return $batchJobResult; } static public function IsJobFinished($batchJobResult) { return !is_null($batchJobResult->status) && $batchJobResult->status == BatchJobResult::STATUS_FINISHED; } } // class Batch