public function generate() { list($token, $error) = $this->_get_token(); $result = @unserialize($token); if ($result == false) { SurStudioPluginTranslatorRevolutionLiteCommon::log($error, $this->_api_key); throw new Exception('Failed (' . __LINE__ . ')'); } if (!array_key_exists('error', $result)) { $result['action'] = 'translate'; } return $result; }