/** * Call the failed method on the job instance. * * @param array $data */ public function failed(array $data) { $command = unserialize($this->encrypter->decrypt(array_key_exists('command64', $data) ? $data['command64'] : $data['command'])); if (method_exists($command, 'failed')) { $command->failed(); } }
/** * Read the session data from the handler. * * @return array */ private function readFromHandler() : array { $data = $this->handler->read($this->id); if ($data) { return json_decode($this->encrypter->decrypt($data), true); } return []; }
/** * Decrypt an array based cookie. * * @param array $cookie * * @return array */ protected function decryptArray(array $cookie) : array { $decrypted = []; foreach ($cookie as $key => $value) { if (is_string($value)) { $decrypted[$key] = $this->encrypter->decrypt($value); } } return $decrypted; }
/** * Run the Closure based queue job. * * @param \Viserio\Contracts\Queue\Job $job * @param array $data */ public function run(JobContract $job, array $data) { $closure = unserialize($this->crypt->decrypt($data['closure'])); $closure($job); }