Gets table's PK as an array.

@return array
559361
protected function _tablePrimaryKey()
    {
        $alias = $this->_table->alias();
        $pk = $this->_table->primaryKey();

        if (!is_array($pk)) {
            $pk = [$pk];
        }

        $pk = array_map(function ($key) use ($alias) {
            return "{$alias}.{$key}";
        }, $pk);

        return $pk;
    }
383546
public function toArray()
    {
        $state = [
            $this->key,
            $this->current ? $this->current->copy() : null,
            $this->validationResult,
        ];

        $result = iterator_to_array($this);

        [
            $this->key,
            $this->current,
            $this->validationResult
        ] = $state;

        return $result;
    }
11834
public function getFks($table): array
	{
		$returnRows = [];

		foreach(parent::getFks($table) as $row)
		{
			$returnRows[] = [
				'child_column' => $row['from'],
				'parent_table' => $row['table'],
				'parent_column' => $row['to'],
				'update' => $row['on_update'],
				'delete' => $row['on_delete']
			];
		}

		return $returnRows;
	}
719435
public static function primary_key()
	{
		$id_only = static::get_primary_key_id_only_status();
		$pk_status = static::get_primary_key_status();

		if ($id_only)
		{
			return static::getNonTimestampPks();
		}

		if ($pk_status && ! $id_only)
		{
			return static::$_primary_key;
		}

		return array();
	}
1013719
public function asArray()
    {
        $array = [];

        foreach ($this as $key => $val) {
            if ($val instanceof self) {
                $val = $val->asArray();
            }
            $array[$key] = $val;
        }

        return $array;
    }
1091612
public function toArray()
    {
        return [
            'name'     => $this->getName(),
            'label'    => $this->getLabel(),
            'width'    => $this->getWidth(),
            'fixed'    => $this->isFixed(),
            'minWidth' => $this->getMinWidth(),
            'sortable' => $this->getSortable(),
            'type'     => $this->getType(),
        ];
    }
419377
public function toArray()
    {
        $raw = $this->dsn->toArray();
        $allKeys = array_unique(array_merge(static::$mandatoryKeys, array_keys($raw)));
        $return = [];

        foreach ($allKeys as $key) {
            if (isset($this->keyMap[$key])) {
                $key = $this->keyMap[$key];
                if (!$key) {
                    continue;
                }
            }

            $val = $this->$key;
            if ($val !== null) {
                $return[$key] = $val;
            }
        }

        return $return;
    }
710162
public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
491430
public function toArray()
    {
        return [
            'balance' => $this->balance,
            'connection' => $this->connection,
            'queue' => $this->queue,
            'delay' => $this->delay,
            'force' => $this->force,
            'maxProcesses' => $this->maxProcesses,
            'minProcesses' => $this->minProcesses,
            'maxTries' => $this->maxTries,
            'memory' => $this->memory,
            'nice' => $this->nice,
            'name' => $this->name,
            'sleep' => $this->sleep,
            'timeout' => $this->timeout,
        ];
    }
1061337
public function getColumnArray() {
        $fields = array('name','type','passThrough','default','nullable',
                        'index','unique','after','pkey');
        $fields = array_flip($fields);
        foreach($fields as $key => &$val)
            $val = $this->{$key};
        unset($val);
        return $fields;
    }
600203
protected function _getPrimaryKey()
    {
        if (!$this->_primaryKey) {
            $primaryKey = (array)$this->_table->getPrimaryKey();
            $this->_primaryKey = $primaryKey[0];
        }

        return $this->_primaryKey;
    }
208662
public function getTableKeys($table)
	{
		$keys = array();

		$fieldCasing = $this->connection->getAttribute(\PDO::ATTR_CASE);

		$this->connection->setAttribute(\PDO::ATTR_CASE, \PDO::CASE_UPPER);

		$table = strtoupper($table);

		$this->setQuery('pragma table_info( ' . $table . ')');
		$rows = $this->loadObjectList();

		foreach ($rows as $column)
		{
			if ($column->PK == 1)
			{
				$keys[$column->NAME] = $column;
			}
		}

		$this->connection->setAttribute(\PDO::ATTR_CASE, $fieldCasing);

		return $keys;
	}
447847
public function toArray()
    {
        $result = array();
        foreach ($this as $key => $entity) {
            $result[$key] = $entity->toArray();
        }
        return $result;
    }
315300
public function getTableColumns() : array
    {
        if (!$this->isTableNameSet()) {
            return [];
        }
        
        $sql = "SHOW COLUMNS FROM `".$this->tableName."`";
        $stmt = $this->db->query($sql);
        $arrResult = $stmt->fetchAll(PDO::FETCH_ASSOC);
        return $arrResult;
    }
247164
public function getColumnPackedCopy()
    {
        $P = [];
        for ($i = 0; $i < $this->m; $i++) {
            for ($j = 0; $j < $this->n; $j++) {
                array_push($P, $this->A[$j][$i]);
            }
        }
        return $P;
    }
964160
public function getBatchArray()
    {
        $batchEntry = [];

        foreach ($this->batches as $batch) {
            $batchEntry[] = $batch->toArray();
        }

        return $batchEntry;
    }
1236754
public function getTable()
    {
        $this->_resetSizes();
        $this->_repadAllLines();
        return array(
            'title'=>$this->getTitle(),
            'head'=>$this->getHeader(),
            'body'=>$this->getBody(),
            'foot'=>$this->getFooter(),
        );
    }