Returns database dump data

@return array
425172
private function getDumpChecksum()
    {
        $dumpName = $this->getDumpName();
        $checksum = $this->getChecksum();

        return array_key_exists($dumpName, $checksum)? $checksum[$dumpName] : array();
    }
626373
public function dump()
    {
        $isFirst = $this->dumpFlag('first', $this->isFirst());
        $isCurrent = $this->dumpFlag('current', $this->isCurrent());
        $isPrevious = $this->dumpFlag('prev', $this->isPrevious());
        $isNext = $this->dumpFlag('next', $this->isNext());
        $isLast = $this->dumpFlag('last', $this->isLast());

        $number = str_pad((string)$this->number(), 10, ' ', STR_PAD_LEFT);

        $flags = "$isCurrent|$isFirst|$isLast|$isPrevious|$isNext";

        $string = str_pad("'$this'", 10, ' ', STR_PAD_LEFT);

        $offset = str_pad((string)$this->getOffset(), 20, ' ', STR_PAD_LEFT);

        return "Page #$number $string offset:$offset flags:$flags";
    }
177764
public function getSqlFiles()
    {
        $sqlFinder = $this->getFinder();

        $files = $sqlFinder->files()
            ->in($this->sqlFilesDir)
            ->name(self::PATTERN)
            ->sort($this->sort())
        ;

        return $files;
    }
803670
public function dump()
    {
        $attributes = array();

        if ($this->id) {
            $attributes['$id'] = $this->id;
        }

        foreach ($this->attributes as $key => $value) {
            $schema = $this->schema($key);

            if (! empty($schema['transient'])) {
                continue;
            }

            $attributes[$key] = $value;
        }

        return $attributes;
    }
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;
    }
140699
public function getDataAsTdbArray()
    {
        $data = (null === $this->getStatusData()) ? array() : $this->getStatusData()->all();
        $data = serialize($data);

        return array(
            'shop_order_id' => $this->getOrder()->id,
            'shop_order_status_code_id' => $this->getShopOrderStatusCodeObject()->id,
            'status_date' => date('Y-m-d H:i:s', $this->getStatusTimestamp()),
            'info' => $this->getInfo(),
            'data' => $data,
        );
    }
218599
public function dumpObject()
    {
        $date = $this->age->format('Y-m-d');
        $string = "Engine: $this->engine \n";
        $string .= "Keyword: $this->keyword \n";
        $string .= "PageUrl: $this->pageUrl \n";
        $string .= "PageNumber: $this->pageNumber \n";
        $string .= "Date: $date \n";
        $string .= "Entries: \n";
        for ($i = 0; $i < count($this->entries); $i++) {
            $url     = $this->entries[$i]['url'];
            $title   = $this->entries[$i]['title'];
            $snippet = $this->entries[$i]['snippet'];
            $pos = $i + 1;
            $string .= "    $pos: \n";
            $string .= "        Url: $url\n";
            $string .= "        Title: $title\n";
            $string .= "        Snippet: $snippet\n";
        }
        return $string;
    }
360675
protected function getDumpDirectory()
    {
        $dumpName = $this->getDumpName();
        $databaseHandler = $this->getDatabaseHandler();
        $directory = $this->getBaseDumpDirectory() . '/' . $databaseHandler->getDbName() . '/' . $dumpName . '/';
        if (!file_exists($directory)) {
            mkdir($directory, 0777, true);
        }

        return $directory;
    }
1179354
protected function getData() {
        if ($this->data === null) {
            $stmt = $this->db->get(
                $this->table,
                $this->where,
                $this->options + [Db::OPTION_FETCH_MODE => $this->getFetchArgs()]
            );

            $data = $stmt->fetchAll(...(array)$this->getFetchArgs());

            if (is_callable($this->rowCallback)) {
                array_walk($data, function (&$row) {
                    $row = call_user_func($this->rowCallback, $row);
                });
            }

            $this->data = $data;
        }

        return $this->data;
    }
635776
public function getDatabaseInfo()
    {
        $parts = explode(':', $this->database_host);

        $info = array(
            'host' => $parts[0],
            'port' => isset($parts[1]) ? $parts[1] : '3306',
            'user' => $this->database_user,
            'password' => $this->database_password,
            'name' => $this->database_name,
            'prefix' => $this->database_prefix
        );

        return $info;
    }
1207076
public function getDBData() {
        $data = [];
        $fields = $this->getFields();
        foreach ($fields as $field => $type) {
            $value = $this->$field;
            if ($value === null) {
                continue;
            }
            $oldValue = $this->_db_data[ $field ];
            if (is_array($type)) {
                $type = $type[ 'type' ];
            }
            if ($type == 'json' && !is_string($value)) {
                $value = json_encode($value);
            }
            //值没有变不保存
            if ($value == $oldValue && $oldValue != null) {
                continue;
            }

            if ($value === 'null') {
                $value = null;
                $this->$field = null;
            } else if ($type == 'int') {
                $value = (int)$value;
            } else if ($type == 'float') {
                $value = (float)$value;
            } else if ($type == 'time' || $type == 'date') {
                $time = (int)$value;
                if ($time . "" != $value) {
                    $value = strtotime($value);
                }
            } else if ($type == 'attach_s') {
                if (is_string($value)) {
                    $attach = [['url' => $value]];
                } else {
                    $attach = $value;
                }
                $values = [];
                foreach ($attach as $item) {
                    $type = 'default';
                    if (key_exists('type', $item)) {
                        $type = $item[ 'type' ];
                    }
                    $url = $item[ 'url' ];
                    $domian = Storage::getStorage($type)->getDomain();
                    if ($domian) {
                        $url = str_replace($domian, "", $url);
                    }
                    $item[ 'url' ] = $url;
                    $values[] = $item;
                }
                $value = json_encode($values);
                if ($value == $oldValue && $oldValue != null) {
                    continue;
                }
            } else if ($type == 'attach' || $type == 'attach_i') {
                if (is_string($value)) {
                    $item = ['url' => $value];
                } else {
                    $item = $value;
                }
                $type = 'default';
                if (key_exists('type', $item)) {
                    $type = $item[ 'type' ];
                }
                $url = $item[ 'url' ];
                $domian = Storage::getStorage($type)->getDomain();
                if ($domian) {
                    $url = str_replace($domian, "", $url);
                }
                $item[ 'url' ] = $url;
                $item = [$item];
                $value = json_encode($item);
                if ($value == $oldValue && $oldValue != null) {
                    continue;
                }
            }
            $data[ $field ] = $value;
        }
        return $data;
    }
603625
protected function getDataArray() {
    return array(
      'created_at' => $this->time,
      'type' => $this->type,
      'sub_type' => empty($this->sub_type) ? '' : $this->sub_type,
      'content_id' => empty($this->content_id) ? 0 : $this->content_id,
      'content_title' => empty($this->content_title) ? '' : $this->content_title,
      'library_name' => empty($this->library_name) ? '' : $this->library_name,
      'library_version' => empty($this->library_version) ? '' : $this->library_version
    );
  }
900633
public function backupStructure(): string
	{
		$string = [];

		// Get databases
		$dbs = $this->getDriver()->getDbs();

		foreach($dbs as &$d)
		{
			// Skip built-in dbs
			// @codeCoverageIgnoreStart
			if ($d === 'mysql')
			{
				continue;
			}
			// @codeCoverageIgnoreEnd

			// Get the list of tables
			$tables = $this->getDriver()->driverQuery("SHOW TABLES FROM `{$d}`", TRUE);

			foreach($tables as $table)
			{
				$array = $this->getDriver()->driverQuery("SHOW CREATE TABLE `{$d}`.`{$table}`", FALSE);
				$row = current($array);

				if ( ! isset($row['Create Table']))
				{
					continue;
				}


				$string[] = $row['Create Table'];
			}
		}

		return implode("\n\n", $string);
	}
222266
public function getDatabases()
    {
        $cursor = $this->server->executeCommand('admin', new \MongoDb\Driver\Command(['listDatabases' => 1]));

        $cursor->setTypeMap(['root' => 'array', 'document' => 'array']);
        $result = current($cursor->toArray());

        $this->queriesResultCache[ 'databaseNames' ] = [];

        if ( ! empty($result[ 'databases' ])) {
            foreach ($result[ 'databases' ] as $database) {
                if ( ! in_array($database[ 'name' ], ['admin', 'local'])) {
                    $this->queriesResultCache[ 'databaseNames' ][] = $database[ 'name' ];
                }
            }
        }

        return $this->queriesResultCache[ 'databaseNames' ];
    }
1291848
public function getData()
    {
        $result = [
            'content_type' => $this->type
        ];

        switch($this->type)
        {
            case self::TYPE_LOCATION:
                $result['image_url'] = $this->image_url;
                break;

            case self::TYPE_TEXT:
                $result['payload'] = $this->payload;
                $result['title'] = $this->title;
                $result['image_url'] = $this->image_url;
                break;
                
            case self::TYPE_USER_PHONE_NUMBER:
                $result['payload'] = $this->payload;
                break;
                
            case self::TYPE_USER_EMAIL:
                $result['payload'] = $this->payload;
                break;
        }

        return $result;
    }
1300327
public function getData()
    {
        if ($this->tempFileName == '') {
            return $this->outputMemory(true);
        } else {
            $this->flush();
            return file_get_contents($this->tempFileName);
        }
    }
446006
public function getSchema()
    {
        $this->output->writeln('Load current database schema.');
        $result = [];

        $result['database'] = $this->getDatabaseSchemata($this->dbName);

        $tables = $this->getTables();
        foreach ($tables as $table) {
            $tableName = $table['table_name'];
            $this->output->writeln(sprintf('Table: <info>%s</info>', $tableName));
            $result['tables'][$tableName]['table'] = $table;
            $result['tables'][$tableName]['columns'] = $this->getColumns($tableName);
            $result['tables'][$tableName]['indexes'] = $this->getIndexes($tableName);
            $result['tables'][$tableName]['foreign_keys'] = $this->getForeignKeys($tableName);
        }

        return $result;
    }