<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\LazyValue; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Job\BaseJob; use Module\Vendor\Log\Logger; class LazyValueJob extends BaseJob { private $key; private $param; private $cacheSeconds; public function __construct($FYJFh, $quZRe, $XbYj3) { goto GEt70; jK13T: $this->param = $quZRe; goto yWIdx; GEt70: $this->key = $FYJFh; goto jK13T; yWIdx: $this->cacheSeconds = $XbYj3; goto mQ8MA; mQ8MA: } public static function create($FYJFh, $quZRe, $XbYj3) { goto hmoO0; ntTUm: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($rrcVP); goto T73u5; jJ5GW: $rrcVP->onQueue('LazyValueJob'); goto ntTUm; hmoO0: $rrcVP = new LazyValueJob($FYJFh, $quZRe, $XbYj3); goto jJ5GW; T73u5: } public static function createRefresh($FYJFh, $quZRe, $XbYj3) { goto lBMRX; Yv7Lr: $rrcVP->onQueue('LazyValueJobRefresh'); goto NolzZ; NolzZ: app('Illuminate\\Contracts\\Bus\\Dispatcher')->dispatch($rrcVP); goto TDJ_F; lBMRX: $rrcVP = new LazyValueJob($FYJFh, $quZRe, $XbYj3); goto Yv7Lr; TDJ_F: } public function handle() { goto uBtkT; GpOml: Logger::info('LazyValueJob', 'Start', array($this->key, $this->cacheSeconds, $this->param)); goto j_bO1; j_bO1: $LPu32 = config('app.lazy_value_processor_roots', array()); goto VX4i4; vMy2T: Logger::info('LazyValueJob', 'End'); goto R6JWT; CMKp5: foreach ($LPu32 as $FtaPe) { $RsA_2 = $FtaPe . '\\' . $this->key . 'Processor'; if (class_exists($RsA_2)) { goto WCzRQ; w23F2: $LiAx3 = true; goto qfwT1; WCzRQ: $DJCYc = new $RsA_2(); goto cQUh0; cQUh0: $VRDYW = $DJCYc->execute($this->param); goto w23F2; qfwT1: } } goto Hwjva; tXfcG: $LiAx3 = false; goto CMKp5; uBtkT: $fhhw8 = time(); goto GpOml; VX4i4: if (empty($LPu32)) { throw new \Exception('LazyValueJob.Error : you should define lazy_value_processor_roots in config/app.php file'); } goto tXfcG; Hwjva: if (!$LiAx3) { throw new \Exception('LazyValueJob.Error : could not found processor ' . $this->key); } goto Nnuc2; Nnuc2: Logger::info('LazyValueJob', 'Result', $VRDYW); goto IZJB6; IZJB6: ModelUtil::update('lazy_value', array('key' => $this->key, 'param' => json_encode($this->param)), array('expire' => time() + $this->cacheSeconds, 'value' => json_encode($VRDYW))); goto vMy2T; R6JWT: } }