取得查询结果

@return array
556501
public function find() {
		//todo: check table exists
		$db = DBFactory::getDB($this->data['table']);
		$result = $db->find($this->data);
		$ret = new ModelArray();
		foreach ((array)$result as $row) {
			$model = new $this->modelClass();
			foreach ($row as $k => $v) {
				$model->setOriginalValue($k, $v);
			}
			$model->setNotNew();
			$ret[] = $model;
		}
		return $ret;
	}
404113
public function getData()
    {
        $data = $this->context->data;
        $result = [
            'version' => 3,
            'file' => $data['file'] ?: '',
            'sourceRoot' => $data['sourceRoot'] ?: '',
            'sources' => $this->sources->getNames(),
            'names' => $this->names->getNames(),
            'mappings' => $this->context->getMappings()->pack(),
        ];
        $contents = $this->sources->getContents();
        if (!empty($contents)) {
            $result['sourcesContent'] = $contents;
        }
        return $result;
    }
818987
public function fetch()
    {
        return [
            'name' => $this->getName($this->controllerName),
            'collection' => $this->getCollection(),
            'resource' => $this->getResource(),
            'model' => $this->getModel(),
            'namespace' => $this->getNamespace()
        ];
    }
952397
public function info()
    {
        $data = [
            'code' => $this->code,
            'message' => $this->message
        ];
        if ($this->details) {
            $data['details'] = $this->details;
        }

        return $data;
    }
797572
public function toArray()
    {
        $array = [];

        if (!empty($this->getBefore())) {
            $array['before'] = [];
            foreach ($this->getBefore() as $beforeAction) {
                $array['before'][] = $beforeAction->toArray();
            }
        }

        if (!empty($this->getAfter())) {
            $array['after'] = [];
            foreach ($this->getAfter() as $afterAction) {
                $array['after'][] = $afterAction->toArray();
            }
        }

        return $array;
    }
61470
public function getAll()
    {
        $result = [];

        foreach ($this->getData() as $key => $value) {
            $result[$key] = $this->get($key);
        }

        return $result;
    }
534921
public function getParams(): array
    {
        $params = $this->getQueryParams();
        $postParams = $this->getParsedBody();

        if ($postParams) {
            $params = array_merge($params, (array)$postParams);
        }

        return $params;
    }
974744
public static function getSavedRoutes()
    {
        $result = [];
        foreach (Yii::$app->getAuthManager()->getPermissions() as $name => $value) {
            if ($name[0] === '/' && substr($name, -1) != '*') {
                $result[] = $name;
            }
        }

        return $result;
    }
1193975
public function getAttributes()
    {
        $return = [];
        foreach ($this->attr as $attr => $info) {
            $return[$attr] = $this->getAttribute($attr);
        }

        return $return;
    }
978965
public function get_headers()
	{
		$headers = array();
		foreach ($this->headers as $key => $value)
		{
			$headers[] = is_int($key) ? $value : $key.': '.$value;
		}

		return $headers;
	}
797974
public function getValues() : array
    {
        $values = [];

        foreach ($this->getOptions() as $option) {
            if ($option->isSelected()) {
                $values[] = $option->getValue();
            }
        }

        return $values;
    }
1131489
public function getActions()
    {
        $actions = [];
        foreach ($this->data['actions'] as $action) {
            $name = $action['name'];
            $time = isset($action['time'])
                ? $action['time']
                : 0;
            if (isset($actions[$name])) {
                $actions[$name]['count'] += 1;
                $actions[$name]['time'] += $time;
            } else {
                $actions[$name] = ['name' => $name, 'count' => 1, 'time' => $time];
            }
        }

        return array_values($actions);
    }
1362045
public function toArray()
    {
        return [
            'folderId' => $this->folder->getId(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
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(),
        ];
    }
384494
public static function get()
	{
		$configFile = Yii::$app->params[Enum::CONFIG_FILE];
		$config = require($configFile);

		if (!is_array($config))
			return [];

		return $config;
	}
1370092
public function toArray()
    {
        return [
            'fileId' => $this->file->getId(),
            'fileVersion' => $this->file->getVersion(),
            'usageType' => $this->usageType,
            'usageId' => $this->usageId,
            'status' => $this->status,
        ];
    }
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')
            ];
        }
    }