返回data
@param array $data
@return boolean|unknown
970750
public function return_data($data){

        if (isset($data['errcode']) && $data['errcode'] > 0){
            $this->error = $data['errmsg'];
            return false;
        }else{
            return $data;
        }
    }
935137
public function data(array $data)
    {
        $this->columns(array_keys($data))->values(array_values($data));

        return $this;
    }
21853
public function updateDevice(array $data)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_DEVICE_UPDATE_PREFIX, $data, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errcode']) && !$result['errcode'] ? $result['data'] : false;
    }
708099
public function setData(array $data)
    {
        if (count($data)) {
            $data = array_combine($data, $data);
        }

        $this->_data = $data;

        return $this;
    }
1164357
public function search(array $data)
    {
        if (!isset($data['size'])) {
            $data['size'] = 10;
        }

        $response = $this->client->post("{$this->uriSearch}search/", [
            'json' => $data,
            'query' => [
                'key' => $this->config['search']['key'],
            ],
        ]);

        $response = json_decode($response->getBody(), true);

        return $response;
    }
848286
protected function getClassFromArray($data)
    {
        if (!is_array($data)) {
            return;
        }

        if (isset($data['@type']) and $type = $data['@type'] and isset($this->types[$type])) {
            $class = $this->types[$type];
        }

        if (isset($data['@class'])) {
            $class = $data['@class'];
        }

        if (isset($class) and class_exists($class)) {
            return $class;
        }
    }
1020949
public function getUserCumulate(array $data)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_USER_CUMULATE_GET_PREFIX, $data, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['list']) ? $result['list'] : false;
    }
270433
public function getData($data)
    {
        if ($this->hasData($data)) {
            return $this->getAttribute(sprintf('data-%s', $data));
        } else {
            return false;
        }
    }
793177
protected function extractData(array $data)
    {
        $converted = array();

        foreach ($data as $value) {

            if ($value instanceof Result) {

                $converted[$value->getId()] = $value->getData();
            }
        }

        return $converted;
    }
971851
public function updateIndexOne(array $data)
    {
        if (!is_array($data)) {
            throw new \Exception('你的索引参数不是一个数组');
        }

        if (count($data) == count($data, 1)) {
            // 一维数组
            $this->getIndex()->update(new \XSDocument($data));
        }

        //索引是否立即生效
        if ($this->flush_index) {
            $this->getIndex()->flushIndex();
        }

        return $this->getIndex();
    }
1036926
public static function arrayColumns(array $data)
    {
        // Count the amount of values from the source input
        $count = count($data);

        if ($count === 0) {
            return false;
        }

        if ($count === 1) {
            return array_keys($data[0]);
        }

        if (isset($data[0])) {
            return array_keys($data[0]);
        } else {
            return false;
        }
    }
953640
public function searchSemantic(array $data)
    {
        $result = $this->httpRaw(self::WECHAT_SEMANTIC_SEMPROXY_PREFIX, $data, [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['errcode']) && !$result['errcode'] ? $result : false;
    }
962465
public function updateGroup(array $data)
    {
        $result = $this->wechat->httpRaw(self::WECHAT_GROUP_UPDATE_PREFIX, $data, [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] == 'success';
    }
54655
protected function parseArrayOfPrimaryData(array $data)
    {
        $isValid = true;
        $result  = null;
        foreach ($data as $primaryData) {
            $parsed = $this->parseSinglePrimaryData($primaryData);
            if ($parsed === null) {
                $isValid = false;
            } else {
                $result[] = $parsed;
            }
        }

        return $isValid === true ? $result : null;
    }
310589
public function update(array $data = [])
    {
        $this->parseOptions();

        $this->options['data'] = array_merge($this->options['data'], $data);

        return $this->connection->update($this);
    }
555268
public function setData(array $data)
    {
        if (isset($data['attachables'])) {
            $this->setAttachables($data['attachables']);
        }

        if (isset($data['groups'])) {
            $this->setGroups($data['groups']);
        }

        if (isset($data['widgets'])) {
            $this->setWidgets($data['widgets']);
        }

        unset($data['attachables'], $data['groups'], $data['widgets']);

        return parent::setData($data);
    }
954277
protected function mapData(array $data) {
        $config = $this->loadConfig();

        foreach ($data as $k => $d) {
            if (!empty($config['diagnostic']['customInput'][$k])) {
                $data[$config['diagnostic']['customInput'][$k]] = $d;
                unset($data[$k]);
            }
        }

        return $data;
    }