用户已关注时的扫码事件触发
@return array
333317
protected function matchEventScan()
    {
        if (array_key_exists('Eventkey', $this->message)) {
            $this->message['Content'] = $this->message['EventKey'];
            return $this->matchText();
        }
        return [];
    }
1266760
public function toArray()
    {
        $event = array();
        
        if ($this->id !== null) {
            $event['id'] = $this->id;
        }
        
        $event['title'] = $this->title;
        $event['start'] = $this->startDatetime->format("Y-m-d\TH:i:sP");
        
        if ($this->url !== null) {
            $event['url'] = $this->url;
        }
        
        if ($this->bgColor !== null) {
            $event['backgroundColor'] = $this->bgColor;
            $event['borderColor'] = $this->bgColor;
        }
        
        if ($this->fgColor !== null) {
            $event['textColor'] = $this->fgColor;
        }
        
        if ($this->cssClass !== null) {
            $event['className'] = $this->cssClass;
        }

        if ($this->endDatetime !== null) {
            $event['end'] = $this->endDatetime->format("Y-m-d\TH:i:sP");
        }
        
        $event['allDay'] = $this->allDay;

        foreach ($this->otherFields as $field => $value) {
            $event[$field] = $value;
        }
        
        return $event;
    }
878849
public function allEvents(): array
    {
        $events = $this->iterableEvents();

        if ($this->endEvent && $this->responseEvent !== $this->endEvent) {
            $events[] = $this->endEvent;
        }

        if ($this->responseEvent) {
            array_unshift($events, $this->responseEvent);
        }

        array_unshift($events, $this->calledEvent);

        return $events;
    }
1271504
public function toArray()
    {
        $event = [
            'app' => $this->config->getAppData(),
            'device' => array_merge(['time' => $this->time], $this->config->getDeviceData()),
            'user' => $this->getUser(),
            'context' => $this->getContext(),
            'payloadVersion' => HttpClient::PAYLOAD_VERSION,
            'severity' => $this->getSeverity(),
            'exceptions' => $this->exceptionArray(),
            'breadcrumbs' => $this->breadcrumbs,
            'metaData' => $this->cleanupObj($this->getMetaData(), true),
            'unhandled' => $this->getUnhandled(),
            'severityReason' => $this->getSeverityReason(),
        ];

        if ($hash = $this->getGroupingHash()) {
            $event['groupingHash'] = $hash;
        }

        if (isset($this->session)) {
            $event['session'] = $this->session;
        }

        return $event;
    }
252512
public function info()
    {
        $data = [
            'id' => $this->id,
            'type' => $this->type
        ];

        if ($this->uncompressedSizeBytes) {
            $data['uncompressedSizeBytes'] = $this->uncompressedSizeBytes;
        }
        if ($this->compressedSizeBytes) {
            $data['compressedSizeBytes'] = $this->compressedSizeBytes;
        }

        return [
            'time' => $this->time,
            'messageEvent' => $data
        ];
    }
308931
public function get(): array
    {
        try {
            $query = $this->apply($this->database->getTablePrefixer());
            $compiled = $this->database->getGrammar()->compileSelect($query);
            return $this->database->select($compiled->getSQL(), $compiled->getBindings());
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
13299
public function behaviors()
    {
        $behaviors = parent::behaviors();
        $behaviors['slug'] = [
            'class' => AttributeBehavior::className(),
            'attributes' => [
                ActiveRecord::EVENT_BEFORE_INSERT => ['slug']
            ],
            'value' => function ($event) {
                return Inflector::slug($event->sender->name,'');
            }
        ];
        $behaviors['letter'] = [
            'class' => AttributeBehavior::className(),
            'attributes' => [
                ActiveRecord::EVENT_BEFORE_INSERT => ['letter']
            ],
            'value' => function ($event) {
                return strtoupper(substr($event->sender->slug, 0, 1));
            }
        ];
        return $behaviors;
    }
1050276
public function toWebDriver()
    {
        return [
            'type' => (count($this->actions) > 0) ? 'actions' : 'text',
            'text' => $this->text,
            'fallback' => $this->fallback,
            'callback_id' => $this->callback_id,
            'actions' => $this->actions,
        ];
    }
1242603
public function listEntries() : array
    {
        $newList = [];

        foreach ($this->entryMetaData as $key => $val) {
            $newList[$key] = [];

            foreach ($val as $sKey => $sval) {
                $newList[$key][$sKey] = $sval;
            }
        }

        return $newList;
    }
895736
protected function listenForEvents()
    {
        // -- Worker处理的事件
        //listener:beforeDaemonLoop
        //listener:beforeGetJob
        //listener:afterGetJob
        //listener:beforeJobHandle
        //listener:logger
        //listener:afterJobHandle
        //listener:jobException
        //listener:jobFailed
        //listener:afterDaemonLoop
        //listener:stop
        $this->eventsManager->attach('listener', function (Event $event, $source, $data) {
            $date = date('Y-m-d H:i:s');
            $class = get_class($source);
            $event = $event->getType();
            $payload = '';
            $message = '';
            if (is_array($data)) {
                $job = $data[0];
                $e = $data[1];
                if ($job instanceof Job) {
                    $payload = $job->getPayload();
                } elseif (is_scalar($data)) {
                    $payload = $data;
                } else {
                    $payload = serialize($job);
                }
                if ($e instanceof \Exception) {
                    $message = $data[1]->getMessage();
                } else {
                    $message = serialize($job);
                }
            } else {
                if ($data instanceof Job) {
                    $payload = $data->getPayload();
                } elseif (is_scalar($data)) {
                    $message = $data;
                } else {
                    $message = serialize($data);
                }
            }
            $this->line('[' . $date . '] Event=listener:' . $event . ', Class=' . $class . ', Msg=' . $message . ', Payload=' . $payload);
        });
    }
805382
public function actions()
    { 	
		$return = [];
		
		$module_token	= Yii::$app->request->post('module_token');
		$this_module_token = \fec\helpers\CModule::getToken();
		if($module_token != $this_module_token){
			
			$return['ack'] = false;
			$return['ack_description'] = "modules token is not right";
			$return['content'] = $module_token.'#'.$this_module_token;
			echo json_encode($return);
			exit;
		}
		$r 				= $this->getControllerAndAction();
		$t_controller 	= $r['controller'];
		$t_action 		= $r['action'];
		$current_remote_function_param_array = Yii::$app->request->post('current_remote_function_param_array');
		$current_remote_function_param_array = unserialize($current_remote_function_param_array);
		$param = (!empty($current_remote_function_param_array) && is_array($current_remote_function_param_array)  ) ?  $current_remote_function_param_array : [] ;
		$current_namespace =  $this->_name_space; 
		$module_o_dir = str_replace("\\controllers","\\o",$current_namespace);
		
		$function_exec = $module_o_dir."\\".$t_controller."::".$t_action;
		$data = \call_user_func_array($function_exec, $param);
		$data = json_decode($data);
		$return['ack'] = true;
		$return['ack_description'] = "success";
		$return['content'] = $data;
		# 把模块更新的session更新到redis上面，以供其他模块使用
		session_commit();
		echo  json_encode($return);
		exit;
    }
177908
public function broadcastWith()
    {
        return [
            'id' => $this->id,
            'webhook' => $this->webhook,
            'request' => $this->request,
            'response' => $this->response,
            'status' => $this->status,
        ];
    }
1042696
public function events()
    {
        $events[ActiveRecord::EVENT_AFTER_DELETE] = 'eventAfterDelete';
        $events[ActiveRecord::EVENT_AFTER_INSERT] = 'save';
        $events[ActiveRecord::EVENT_AFTER_UPDATE] = 'save';
        return $events;
    }
54871
protected function basicSerialize()
    {
        return [
            'type' => $this->getEventType(),
            'transaction' => $this->transactionId,
            'primary_key' => $this->id,
            'source' => $this->source,
            'parent_source' => $this->parentSource,
            '@timestamp' => $this->timestamp,
            'meta' => $this->meta
        ];
    }
907800
public function toArray()
    {
        $array = [];

        if (!empty($this->getWhenInsert())) {
            $array['whenInsert'] = $this->getWhenInsert()->toArray();
        }

        if (!empty($this->getWhenUpdate())) {
            $array['whenUpdate'] = $this->getWhenUpdate()->toArray();
        }

        if (!empty($this->getWhenDelete())) {
            $array['whenDelete'] = $this->getWhenDelete()->toArray();
        }

        return $array;
    }
456213
public function getData()
    {
        $result = [
            'type' => $this->type
        ];

        switch($this->type)
        {

            case self::TYPE_WEB:
              $result['url'] = $this->url;

              if ($this->webview_height_ratio) {
                  $result['webview_height_ratio'] = $this->webview_height_ratio;
              }

              if ($this->messenger_extensions){
                  $result['messenger_extensions'] = $this->messenger_extensions;
                  $result['fallback_url'] = $this->fallback_url;
              }
            break;

        }

        return $result;
    }
359498
public function getLifecycleCallbacks()
    {
        $result = array();
        if ($lifecycleCallbacks = trim($this->parseComment('lifecycleCallbacks'))) {
            foreach (explode("\n", $lifecycleCallbacks) as $callback) {
                list($method, $handler) = explode(':', $callback, 2);
                $method = lcfirst(trim($method));
                if (!in_array($method, array('postLoad', 'prePersist', 'postPersist', 'preRemove', 'postRemove', 'preUpdate', 'postUpdate'))) {
                    continue;
                }
                if (!isset($result[$method])) {
                    $result[$method] = array();
                }
                $result[$method][] = trim($handler);
            }
        }

        return $result;
    }