# $req_data	  =   [];  传递的参数
13455
public function fetch($obj_data,$req_data=[]){
		if(!is_array($req_data)){
			$message = 'fetch($obj_data,$req_data),$req_data must be array';
			throw new \yii\web\HttpException(406,$message);
		} 
		$data = '';
		if(is_array($obj_data) && !empty($obj_data)){
			$modules 	= $obj_data[0];
			$file 		= $obj_data[1];
			
			$function 	= $obj_data[2];
			$is_remote 	= $obj_data[3];
			if($modules && $file && $function){
				$ModulesConfig = $this->getModulesConfig();
				if(isset($ModulesConfig[$modules])){
					$moduleConfig = $ModulesConfig[$modules];
					if($is_remote){
						# 远程 
						# 把模块更新的session更新到redis上面，以供其他模块使用
						session_commit();
						$data = $this->getRemotePostData($modules,$moduleConfig,$file,$function,$req_data,$timeout = 20);
					}else{
						# 本地
						$file   = str_replace("/","\\",$file);
						$function_exec = $moduleConfig['moduleDir']."\\o\\".$file;
						$function_exec .= "::".$function;
						$data = \call_user_func_array($function_exec,$req_data);
						$data = CFunc::object_to_array(json_decode($data));
					}
				}else{
					$message = "!! Get Data From Local Module <$modules> Error: Module is not config in Profile.";
					throw new \yii\web\HttpException(406,$message);
					
					
		
				}
			}else{
				$message = "!! Get Data From Local Module <$modules> Error: param:obj_data must is array and count >= 3.";
				throw new \yii\web\HttpException(406,$message);
				
			}
		}else{
			$message = "!! Get Data From Local Module <$modules> Error: param:obj_data is Empty OR is not Array .";
			throw new \yii\web\HttpException(406,$message);
			
			
		}
		return $data;
	}
1107390
public static function getRawData(): string
    {
        if (static::$rawData === null) {
            static::$rawData = file_get_contents('php://input');

            if (static::$rawData === false) {
                throw new RequestException('Unable to read raw data from request');
            }
        }

        return static::$rawData;
    }
378666
public function getArrayResponse()
    {
        $json = [];
        $json['jsonrpc'] = '2.0';

        if ($this->errorCode) {

            $json['error'] = [];
            $json['error']['code'] = $this->errorCode;
            $json['error']['message'] = $this->errorMessage;

            if (!empty($this->errorData)) {
                $json['error']['data'] = $this->errorData;
            }

        } else {
            $json['result'] = $this->result;
        }

        $json['id'] = !empty($this->id) ? $this->id : null;

        return $json;
    }
890255
private static function getRouteArray() {
        //获取请求URL
        $requestUrl = ltrim(rtrim($_SERVER['REQUEST_URI'], '/'), '/');

        //处理特殊情况，去掉index.php/
        if (substr($requestUrl, 0, 9) == 'index.php') {
            $requestUrl = substr($requestUrl, 10);
        }

        //去除?以后的所有参数
        $requestUrl = String::urlSafetyFilter($requestUrl);
        $requestUrlArr = explode('?', $requestUrl);

        //处理请求URL
        $requestUrlArr = explode('/', $requestUrlArr[0]);

        if (count($requestUrlArr) == 0) {
            error_404();
        }

        $requestUrlArr = self::secondDomainFilter($requestUrlArr);

        return $requestUrlArr;
    }
746725
public function getData($data = []) {
        for ($i = ((($this->_byPage * $this->_currentPage) - $this->_byPage)); $i <= (($this->_byPage * $this->_currentPage) - 1); $i++) {
            if (isset($data[$i])) {
                array_push($this->_data, $data[$i]);
            }
        }

        return $this->_data;
    }
1338199
public function getData()
    {
        $this->validate('amount', 'token');

        $data = array();
        $data['token'] = $this->getToken();
        $data['amount'] = $this->getAmountInteger();
        $data['currencyCode'] = $this->getCurrency();
        $data['orderDescription'] = $this->getDescription();
        $data['customerOrderCode'] = $this->getTransactionId();
        $data['currency'] = $this->getCurrency();

        $card = $this->getCard();

        if ($card) {
            $data['billingAddress'] = array();
            $data['billingAddress']['address1'] = $card->getBillingAddress1();
            $data['billingAddress']['address2'] = $card->getBillingAddress2();
            $data['billingAddress']['city'] = $card->getBillingCity();
            $data['billingAddress']['state'] = $card->getBillingState();
            $data['billingAddress']['countryCode'] = $card->getBillingCountry();
            $data['billingAddress']['postalCode'] = $card->getBillingPostcode();
            $data['billingAddress']['telephoneNumber'] = $card->getBillingPhone();

            $data['name'] = $card->getName();

            $data['deliveryAddress'] = array();

            $data['deliveryAddress']['firstName'] = $card->getShippingFirstName();
            $data['deliveryAddress']['lastName'] = $card->getShippingLastName();
            $data['deliveryAddress']['address1'] = $card->getShippingAddress1();
            $data['deliveryAddress']['address2'] = $card->getShippingAddress2();
            $data['deliveryAddress']['city'] = $card->getShippingCity();
            $data['deliveryAddress']['state'] = $card->getShippingState();
            $data['deliveryAddress']['countryCode'] = $card->getShippingCountry();
            $data['deliveryAddress']['postalCode'] = $card->getShippingPostcode();
            $data['deliveryAddress']['telephoneNumber'] = $card->getBillingPhone();

            $data['shopperEmailAddress'] = $card->getEmail();
        }

        $data['shopperIpAddress'] = $this->getClientIp();

        // Omnipay does not support recurring at the moment
        $data['orderType'] = 'ECOM';

        return $data;
    }
25824
public function getData() : array
    {
        $data = [];
        $request = $this->getRequest();
        $method = $request->getMethod();

        switch ($method) {

            //GET
            case Request::METHOD_GET:
                $data = $_GET ?: [];
            break;

            //POST
            case Request::METHOD_POST:
                $data = $_POST ?: [];
            break;

            //Other supported
            case Request::METHOD_DELETE:
            case Request::METHOD_PUT:
            case Request::METHOD_PATCH:
                parse_str($request->getRequestBody(), $data);
            break;

        }

        return $data;
    }
372913
public function customWhere($array_data = [])
    {
        $syntax = '';
        $tmp = [];
        foreach ($array_data as $key => $value) {
            $key = trim($key);
            if (strstr($key, ' ')) {
                $array = explode(' ', $key);
                if (count($array) == '2') {
                    $random = ''; //"_".rand(1,100);
                    $field = $array[0];
                    $operator = $array[1];
                    $tmp[] = "$field $operator :s_$field" . "$random";
                    $syntax .= " $field $operator :s_$field" . "$random ";
                } elseif (count($array) == '3') {
                    $random = ''; //"_".rand(1,100);
                    $condition = $array[0];
                    $field = $array[1];
                    $operator = $array[2];
                    $tmp[] = "$condition $field $operator :s_$field" . "$random";
                    $syntax .= " $condition $field $operator :s_$field" . "$random ";
                }
            }
        }

        return [
            'where' => $syntax,
            'bind' => implode(' ', $tmp),
        ];
    }
1143217
public function getData()
    {
        $request    = $this->request;
        $dql_fields = array_values($this->fields);

        // add sorting
        if ($request->get('iSortCol_0') !== null)
        {
            $order_field = current(explode(' as ', $dql_fields[$request->get('iSortCol_0')]));
        }
        else
        {
            $order_field = null;
        }
        $qb = clone $this->queryBuilder;
        if (!is_null($order_field))
        {
            $qb->orderBy($order_field, $request->get('sSortDir_0', 'asc'));
        }
        else
        {
            $qb->resetDQLPart('orderBy');
        }

        // extract alias selectors
        $select = array($this->entity_alias);
        foreach ($this->joins as $join)
        {
            $select[] = $join[1];
        }
        $qb->select(implode(',', $select));

        // add search
        $this->_addSearch($qb);

        // get results and process data formatting
        $query          = $qb->getQuery();
        $iDisplayLength = (int) $request->get('iDisplayLength');
        if ($iDisplayLength > 0)
        {
            $query->setMaxResults($iDisplayLength)->setFirstResult($request->get('iDisplayStart'));
        }
        $objects         = $query->getResult(Query::HYDRATE_OBJECT);
        $data            = array();
        $entity_alias    = $this->entity_alias;
        $joins           = $this->joins;
        $__getParentChain = function($field) use($entity_alias, $joins, &$__getParentChain) {
            foreach ($joins as $join)
            {
                if ($join[1] == $field[0])
                {
                    if ($join[0][0] == $entity_alias)
                    {
                        return substr($join[0], 2);
                    }
                    else
                    {
                        $f = $join[0];
                        if (strpos($f, ' '))
                        {
                            $_f = substr($f, 2, strpos($f, ' '));
                        }
                        else
                        {

                            $_f = substr($f, 2);
                        }
                        return $__getParentChain($join[0]) . '.' . $_f;
                    }
                }
            }
        };
        $__getKey = function($field) use($entity_alias, $__getParentChain) {
            $has_alias = preg_match_all('~([A-z]?\.[A-z]+)?\sas~', $field, $matches);
            $_f        = ( $has_alias > 0 ) ? $matches[1][0] : $field;
            $_f        = explode('.', $_f)[1];
            if ($field[0] != $entity_alias)
            {
                return $__getParentChain($field) . '.' . $_f;
            }
            return $_f;
        };
        $fields = array();
        foreach ($this->fields as $field)
        {
            $fields[] = $__getKey($field);
        }
        $__getValue = function($prop, $object)use(&$__getValue) {
            if (strpos($prop, '.'))
            {
                $_prop     = substr($prop, 0, strpos($prop, '.'));
                $ref_class = new \ReflectionClass($object);
                $property  = $ref_class->getProperty($_prop);
                $property->setAccessible(true);
                return $__getValue(substr($prop, strpos($prop, '.') + 1), $property->getValue($object));
            }
            $ref_class = new \ReflectionClass($object);
            $property  = $ref_class->getProperty($prop);
            $property->setAccessible(true);
            return $property->getValue($object);
        };
        foreach ($objects as $object)
        {
            $item = array();
            foreach ($fields as $_field)
            {
                $item[] = $__getValue($_field, $object);
            }
            $data[] = $item;
        }
        return array($data, $objects);
    }
473588
function _check(&$data, $param)
    {
        foreach ($param as $k => $p)
        {
            if (!isset($data[$k]))
            {
                if (isset($p['require']) and $p['require'])
                {
                    self::raise('param require');
                }
                else
                {
                    continue;
                }
            }

            if (isset($p['type']))
            {
                $data[$k] = Validate::$p['type']($data[$k]);
                if ($data[$k] === false)
                {
                    self::raise();
                }

                //最小值参数
                if (isset($p['min']) and is_numeric($data[$k]) and $data[$k] < $p['min'])
                {
                    self::raise('num too small');
                }
                //最大值参数
                if (isset($p['max']) and is_numeric($data[$k]) and $data[$k] > $p['max'])
                {
                    self::raise('num too big');
                }

                //最小值参数
                if (isset($p['short']) and is_string($data[$k]) and mb_strlen($data[$k]) < $p['short'])
                {
                    self::raise('string too short');
                }
                //最大值参数
                if (isset($p['long']) and is_string($data[$k]) and mb_strlen($data[$k]) > $p['long'])
                {
                    self::raise('string too long');
                }

                //自定义的正则表达式
                if ($p['type'] == 'regx' and isset($p['regx']) and preg_match($p['regx'], $data[$k]) === false)
                {
                    self::raise();
                }
            }
        }
        //如果为拒绝模式，所有不在过滤参数$param中的键值都将被删除
        if ($this->mode == 'deny')
        {
            $allow = array_keys($param);
            $have = array_keys($data);
            foreach ($have as $ha)
            {
                if (!in_array($ha, $allow))
                {
                    unset($data[$ha]);
                }
            }
        }
    }
579755
public function load()
    {
        $data = [];

        $settings = $this->database->select('SELECT * FROM '.$this->table);

        foreach ($settings as $setting) {
            $id = $setting->id;
            $value = $setting->value;

            $decoded = json_decode($value, 1, 512);
            if (is_array($decoded)) {
                $value = $decoded;
            }

            Arr::set($data, $id, $value);
        }

        return $data;
    }
592722
private function supplementGetArray()
    {
        if (empty($_SERVER["REQUEST_URI"]))
        {
            return;
        }

        $queryStringBegins = strpos($_SERVER["REQUEST_URI"], '?');

        if (empty($queryStringBegins))
        {
            return;
        }

        $queryString = substr($_SERVER["REQUEST_URI"], $queryStringBegins + 1);

        $getArray = array();
        parse_str($queryString, $getArray);

        foreach ($getArray as $variable => $value) {
            $this->getParams[$variable] = $this->cleanVariable($value);
        }
    }
110205
function fetch_array($sql)
    {
        $rs   = $this->query($sql);
        $data = $rs->fetch_assoc();
        if (empty($data)) {
            $data = [];
        }

        $rs->free();
        return $data;
    }
919715
public function find($data = null)
    {
        $key = '';
        if ($data instanceof MongoQuery) {
            return $data->find();
        } elseif ($data instanceof \Closure) {
            call_user_func_array($data, [ & $this]);
            $data = null;
        }
        // 分析查询表达式
        $options = $this->parseExpress();
        $pk      = $this->getPk();
        if (!is_null($data)) {
            // AR模式分析主键条件
            $this->parsePkWhere($data, $options);
        } elseif (!empty($options['cache']) && true === $options['cache']['key'] && is_string($pk) && isset($options['where']['$and'][$pk])) {
            $key = $this->getCacheKey($options['where']['$and'][$pk], $options);
        }

        $options['limit'] = 1;

        // 生成查询SQL
        $query = $this->builder->select($options);
        if (is_string($pk)) {
            if (!is_array($data)) {
                if (isset($key) && strpos($key, '|')) {
                    list($a, $val) = explode('|', $key);
                    unset($a);
                    $item[$pk]     = $val;
                } else {
                    $item[$pk] = $data;
                }
                $data = $item;
            }
        }
        $options['data'] = $data;
        // 事件回调
        if ($result = $this->trigger('before_find', $options)) {
        } else {
            // 执行查询
            $readPreference = isset($options['readPreference']) ? $options['readPreference'] : null;
            $resultSet      = $this->query($options['table'], $query, $readPreference, $options['fetch_cursor'], $options['typeMap']);

            if ($resultSet instanceof Cursor) {
                // 返回MongoDB\Driver\Cursor对象
                return $resultSet;
            }
            $result = isset($resultSet[0]) ? $resultSet[0] : null;
        }
        return $result;
    }
402851
public function parseData()
    {
        $data = [];
        $file1 = __DIR__.'/Config/App.php';
        $file2 = __DIR__.'/../Config/App.php';
        if (file_exists($file1)) {
            $data += require $file1;
        } elseif (file_exists($file2)) {
            $data += require $file2;
        } else {
            throw new \Exception("Error, while loading Config {$file1} file", 404);
        }

        return $data;
    }
680410
function(data){
			//console.log(data);
			//丢弃data的第一行
			var res = '', i = 1, len = data.length;
			for(; i < len; i++){
				res += data[i].replace(/^[\t ]+/, '');
			}
			return res;
		}
474814
public function select($data = null)
    {
        if ($data instanceof MongoQuery) {
            return $data->select();
        } elseif ($data instanceof \Closure) {
            call_user_func_array($data, [ & $this]);
            $data = null;
        }
        // 分析查询表达式
        $options = $this->parseExpress();

        if (!is_null($data)) {
            // 主键条件分析
            $this->parsePkWhere($data, $options);
        }

        // 生成MongoQuery对象
        $query = $this->builder->select($options);

        $options['data'] = $data;
        if ($resultSet = $this->trigger('before_select', $options)) {
        } else {
            // 执行查询操作
            $readPreference = isset($options['readPreference']) ? $options['readPreference'] : null;
            $resultSet      = $this->query($options['table'], $query, $readPreference, $options['fetch_cursor'], $options['typeMap']);

            if ($resultSet instanceof Cursor) {
                // 返回MongoDB\Driver\Cursor对象
                return $resultSet;
            }
        }
        return $resultSet;
    }