获取用户发送的消息
- 已集成消息解密

@return array
965693
private function getMessage()
    {
        if ($this->echostr === false && $this->checkSignature()) {

            // 获取微信原始消息体
            if (@file_get_contents('php://input') !== false) {
                $xml_input = file_get_contents('php://input');
            } else {
                $xml_input = $GLOBALS['HTTP_RAW_POST_DATA'];
            }
            if (!empty($xml_input)) {

                // XML解析微信消息体
                libxml_disable_entity_loader(true);
                $xml_obj = simplexml_load_string($xml_input, 'SimpleXMLElement', LIBXML_NOCDATA);
                        
                // 微信 兼容模式/安全模式 信息解密
                if ($this->encrypt_type == 'aes') {
                    // 异常处理: 未配置encodingAESKey
                    if ($this->encodingAESKey===false) {
                        @error_log('EncodingAESKey Not Defined.', 0);
                        exit();
                    }
                    // 验证用户消息的安全签名
                    $msg_signature = SHA1::getSHA1($this->token, $this->timestamp, $this->nonce, $xml_obj->Encrypt);
                    if ($msg_signature === false) {
                        @error_log('getSHA1 Error.', 0);
                        exit();
                    }
                    if ($msg_signature != $this->msg_signature){
                        @error_log('MsgSignature Not Match.', 0);
                        exit();
                    }
                    // 解密用户消息
                    $pc = new Prpcrypt($this->encodingAESKey);
                    $xml_input1 = $pc->decrypt($xml_obj->Encrypt, $this->appId);
                    if ($xml_input1 === false) {
                        @error_log('Decode Message Error.', 0);
                        exit();
                    }
                    $xml_obj = simplexml_load_string($xml_input1, 'SimpleXMLElement', LIBXML_NOCDATA);
                }    
                $this->message = $xml_obj;
                return $xml_obj;
            }
        }
        exit();
    }
14830
protected function getData()
    {
        if ($this->argument('user')) {
            return [
                'name' => $this->argument('name'),
                'user' => $this->argument('user'),
                'password' => $this->argument('password')
            ];
        } else {
            return [
                'name' => $this->argument('name')
            ];
        }
    }
996449
public function toArray() {
		if ($this->_array) {
			return $this->_array;
		}
		$root = $this->documentElement;
		if ($root == 'error') {
			return array(
				0 => array(
					'id' => $root->getAttribute('id'),
					'code' => $root->getAttribute('code'),
					'auxCode' => $root->getAttribute('auxCode'),
					'message' => $root->firstChild->nodeValue
				)
			);
		}
		$this->_array = $this->_toArray($root->childNodes);
		return $this->_array;

	}
1044519
public function getData()
    {
        $return = [];

        foreach ($this->collections as $collection) {
            $return[$collection->name()] = $collection->items();
        }

        if (count($this->dump) != 0) {
            $return['dump'] = $this->dump;
        }

        return $return;
    }
222414
public function dump()
    {
        $dump = [];
        if ($this->hasParameters()) {
            foreach ($this->parameters as $parameter) {
                $dump[$parameter->getName()] = $parameter->dump();
            }
        }
        return $dump;
    }
741365
public function getValues()
    {
        $result = [];
        $defaults = $this->defaults();
        foreach ($defaults as $name => $value) {
            if ($this->getData()->has($name)) {
                $result[$name] = $this->getData()->get($name);
            } else {
                $result[$name] = $value;
            }
        }
        return $result;
    }
849966
public function data()
    {
        return [
            'property'    => $this->property(),
            'table'       => $this->table(),
            'value'       => $this->value(),
            'func'        => $this->func(),
            'operator'    => $this->operator(),
            'conjunction' => $this->conjunction(),
            'filters'     => $this->filters(),
            'condition'   => $this->condition(),
            'active'      => $this->active(),
            'name'        => $this->name(),
        ];
    }
427522
public function toArray()
    {
        return [
            'name' => $this->getName(),
            'text' => $this->getText(),
            'style' => $this->getStyle(),
            'type' => $this->getType(),
            'value' => $this->getValue(),
            'confirm' => $this->getConfirm()->toArray(),
        ];
    }
590241
public function toArray()
  {
    $return = [];
    foreach ( $this as $property => $value ) {
      if ( '__' == substr( $property, 0, 2 ) || '' === $value || is_null( $value ) || ( is_array( $value ) && empty( $value ) ) ) {
        continue;
      }

      if ( in_array( $property, $this->functions ) && substr( $value, 0, 8 ) == 'function' ) {
        $value = "%{$property}%";
      }

      $return[ $property ] = $value;
    }

    return $return;
  }
157857
public function toArray()
    {
        return [
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->startTimestamp,
                'value' => $this->values[0]
            ],
            [
                'endpoint' => $this->endpoint->toArray(),
                'timestamp' => $this->endTimestamp,
                'value' => $this->values[1]
            ]
        ];
    }
1369438
public function getData()
    {
        $data = array();
        foreach (get_object_vars($this) as $key => $value) {
            if (strpos($key, '__') !== 0) {
                $data[$key] = $value;
            }
        }

        return $data;
    }
1078957
public function toArray()
    {
        return [
            'text' => $this->getText($this->getModel()),
            'attributes' => $this->getConditionAttributes($this->model)->htmlAttributesToString(),
            'url' => $this->getUrl($this->getModel()),
            'position' => $this->getPosition(),
            'icon' => $this->getIcon(),
            'hideText' => $this->hideText,
        ];
    }
455191
public function select(): array
    {
        //生成请求游标
        $cursor = call_user_func_array([
            $this->collection,
            'find'
        ], func_get_args());

        //逐条取出结果,构造数组
        $result = [];
        while ($cursor->hasNext()) {
            $result[] = $cursor->getNext();
        }

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

        switch($this->type)
        {
            case self::TYPE_POSTBACK:
                $result['title'] = $this->title;
                $result['payload'] = $this->url;
            break;

            case self::TYPE_CALL:
                $result['title'] = $this->title;
                $result['payload'] = $this->url;
            break;

            case self::TYPE_WEB:
              $result['title'] = $this->title;
              $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;
              }
              
              if($this->webview_share_button){
                  $result['webview_share_button'] = $this->webview_share_button ;
              }
            break;

            case self::TYPE_SHARE:
              //only share_contents needed
               if ($this->share_contents)
                $result['share_contents'] = $this->share_contents->getData();
            break;

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

            case self::TYPE_ACCOUNT_UNLINK:
              //only type needed
            break;

        }

        return $result;
    }
695109
public function toArray()
    {
        return [
            'name'        => $this->name,
            'title'       => $this->title,
            'url'         => $this->url,
            'icon'        => $this->icon,
            'active'      => $this->isActive(),
            'children'    => $this->children->toArray(),
            'roles'       => $this->roles,
            'permissions' => $this->permissions,
        ];
    }
542921
public function toString()
    {
        $temp = [];
        foreach ($this->data as $queryItem) {
            $temp[$queryItem->name] = $queryItem->value;
        }
        return http_build_query($temp);
    }
664647
public function getData()
    {
        return [
            self::POSTCODE_ATTR => $this->postcode,
            self::COUNTRY_ATTR => $this->country->getCode(),
        ];
    }