Gets the array of fields/properties for the schema.

@return array
963166
public function Fields($Tablename = FALSE) {
      if (!$Tablename)
         $Tablename = $this->CurrentTable;

      return $this->_Schema[$Tablename];
   }
1051864
protected function getManagedProperties(): array
    {
        $properties = $this->entityMap->getProperties();

        $attributesName = $this->entityMap->getAttributesArrayName();

        return $attributesName == null ? $properties : array_merge($properties, [$attributesName]);
    }
1318664
private function getFileFields() : array
    {
        $config = new ModuleConfig(ConfigType::MIGRATION(), $this->table->getAlias());
        $config = json_encode($config->parse());
        if (false === $config) {
            return [];
        }

        $fields = json_decode($config, true);

        if (empty($fields)) {
            return [];
        }

        $fields = array_filter($fields, function ($params) {
            return in_array($params['type'], self::FIELD_TYPES);
        });

        return array_keys($fields);
    }
483410
public function toArray()
    {
        $userParameters = [];

        foreach ($this->tsProperty as $property => $tsPropObj) {
            $userParameters[$property] = $tsPropObj->getValue();
        }

        return $userParameters;
    }
285329
public function getFields()
    {
        if (null == $this->fields) {
            $properties = $this->inspector->getClassProperties();
            $this->fields = new FieldsCollection();
            foreach ($properties as $property) {
                $this->addDescriptor($property);
            }
        }
        return $this->fields;
    }
1139916
public function getFieldsUsed(): array
    {
        $fields = [];

        /** @var Field $node */
        foreach ($this->getNodesOfType(Field::NODE_TYPE) as $node) {
            $fields[$node->getName()] = true;
        }

        return array_keys($fields);
    }
882608
public function getItemSchema()
	{
		$attributes = $this->_getManager()->getSearchAttributes( false );
		return array(
			'name' => $this->_name,
			'properties' => $this->_getAttributeSchema( $attributes ),
		);
	}
394860
protected function getTableFields() {
        $data = array_keys($this->rules());
        if (!empty($this->primaryKey)) {
            $data[] = $this->primaryKey;
        }
        return $data;
    }
366490
protected function getFieldsAsArrays()
    {
        $fields = [];

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

        return $fields;
    }
407045
public function toArray()
    {
        $array = parent::toArray();

        // Typecast every known field with it's respective data-type.
        // Integer, float and boolean fields may vary accourding to the
        // database engine
        if (isset($this->schema['attributes'])) {
            foreach($this->schema['attributes'] as $attribute) {
                @settype($array[$attribute['name']], $attribute['type']);
            }
        }

        $observer = static::getObserver($this->getTable());
        if ($observer) {
            if (method_exists($observer, 'toArray')) {
                return $observer->toArray($this, $array);
            }
        }

        return $array;
    }
645457
public function getPropertiesAsArray()
    {
        $array = array();

        foreach ($this->getProperties() as $property) {
            $array[$property->getName()] = [ 'value' => $property->getValue(), 'type' => $property->getType() ];
        }

        return $array;
    }
530103
public function getExportFields()
    {
        $fields = array();
        foreach (DataObject::getSchema()->databaseFields($this->modelClass) as $field => $spec) {
            $fields[$field] = $field;
        }
        return $fields;
    }
674456
protected function getFields(): array
    {
        $fields = $this->getConfig('fields');
        $defaults = [
            'decrypt' => false,
        ];
        $result = [];
        foreach ($fields as $field => $values) {
            if (is_numeric($field)) {
                $field = $values;
                $values = [];
            }
            $values = array_merge($defaults, $values);
            $result[$field] = $values;
        }

        return $result;
    }
144459
public function getSchema()
    {
        $schema = new Schema(['adapter' => $this->_adapter]);
        $tables = $this->getTables();
        foreach ($tables as $tableName) {
            $schema->addTable($this->getTable($tableName));
        }

        return $schema;
    }
775360
public function getAsArray(): array
    {
        $result = array();

        foreach ($this->_definition as $key => $def) {
            $result[$key] = $this->getFieldAsArray($key);
        }

        return $result;
    }
31035
public function __toArray()
    {
        $data = array();

        foreach (static::schema() as $field => $options) {
            $data[$field] = $this->{$field};
        }

        return $data;
    }
1077606
private function buildFields() {
        $fields = array();
        /** @var ResultSet $results */
        $results = $this->getConfiguration()->getConnection()->query('SHOW COLUMNS FROM `' . $this->getTableName() . '`');
        $dbName = $this->getCurrentDatabaseName();
        while($result = $results->fetch()) {
            $result = (object)$result;
            $params = array($dbName, $this->getTableName(), $result->Field);
            /** @var ResultSet $informationResults */
            $informationResults = $this->getConfiguration()->getInformationSchemaConnection()->query(
                'SELECT * FROM `COLUMNS` WHERE TABLE_SCHEMA=? AND TABLE_NAME=? AND COLUMN_NAME=?',
                $params
            );
            /** @var \stdClass $informationResult */
            $informationResult = (object)$informationResults->fetch();
            $field = new Field($result, $this->getTableName(), $informationResult);
            switch($field->getType()) {
                case 'Date':
                    $this->getAbstractClass()->addUse($this->getConfiguration()->getDateClassName());
                    break;
                case 'DateTime':
                    $this->getAbstractClass()->addUse($this->getConfiguration()->getDateTimeClassName());
                    break;
            }
            $fields[] = $field;
        }
        usort(
            $fields,
            function (Field $fieldA, Field $fieldB) {
                return strcasecmp($fieldA->getShortName(), $fieldB->getShortName());
            }
        );
        $this->setFields($fields);
    }