@return array

@throws DataSourceException
423375
protected function getRow($continueRow = null)
    {
        ++$this->curRowNum;
        try {
            $line = fgets($this->resource);
        } catch (\Exception $e) {
            throw new DataSourceException($e->getMessage(), $this->curRowNum);
        }

        $row = $this->csvDialect->parseRow($line, $continueRow);
        if (count($row) > 0 && is_a($row[count($row) - 1], 'frictionlessdata\\tableschema\\ContinueEnclosedField')) {
            return $this->getRow($row);
        } else {
            return $row;
        }
    }
564069
public function getDatasourceService()
    {
        if ($this->datasourceService == null) {
            $this->datasourceService = $this->newService('AppserverIo\Appserver\Core\Api\DatasourceService');
        }
        return $this->datasourceService;
    }
575362
public function writeData(): array
    {
        $dataBuilder = new DataBuilder();
        $dataBuilder->setFloat('r', $this->getRed(), 1.)
                    ->setFloat('g', $this->getGreen(), 1.)
                    ->setFloat('b', $this->getBlue(), 1.)
                    ->setFloat('a', $this->getAlpha(), 1.);
        return $dataBuilder->getData();
    }
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;
    }
350864
public function jsonSerialize()
    {
        return array(
            self::SOURCE_FACTORY => $this->metadataDaoFactory,
            self::FACTORY        => $this->driver,
            self::RESPONSE       => $this->response,
            self::UNIQUE_NAME    => $this->uniqueName,
        );
    }
85253
public function getDataSource()
    {
        if (empty($this->dataSource)) {
            // Assign the default data source, now that one is needed.
            $this->dataSource = $this->getDefaultDataSource();
            // If, after assigning the data source, there is still nothing in
            // the property, then fail.
            if (empty($this->dataSource)) {
                throw new Exception('No datasource has been defined.');
            }
        }

        return $this->dataSource;
    }
121892
public function getData(): array
    {
        $combined = $this->getDelegated()->getData();
        foreach (parent::getData() as $key => $value) {
            if (!array_key_exists($key, $combined)) {
                $combined[$key] = $value;
                continue;
            }
            if (\is_array($value)) {
                if (!is_array($combined[$key])) {
                    throw new \RuntimeException('Can not merge key "' . $key . '", parent value is not an array.');
                }

                /** @noinspection SlowArrayOperationsInLoopInspection - can not optimize here */
                $combined[$key] = array_merge($combined[$key], $value);
                continue;
            }

            $combined[$key] = $value;
        }

        return $combined;
    }
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;
    }
801298
public function toArray()
    {
        return
            [
            'fields' => $this->getFieldsToArray(),
            'relations' => $this->getRelationsToArray(),
            'indexes' => $this->getIndexesToArray(),
            'auto-manage-created-and-updated-at' => $this->isCreateAndUpdateAtManaged(),
            'table-name' => $this->getTableName(),
            'protection' => $this->getRawProtections(),
        ];
    }
308931
public function get(): array
    {
        try {
            $query = $this->apply($this->database->getTablePrefixer());
            $compiled = $this->database->getGrammar()->compileSelect($query);
            return $this->database->select($compiled->getSQL(), $compiled->getBindings());
        } catch (\Throwable $exception) {
            return $this->handleException($exception);
        }
    }
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;
    }
974563
@Override
    public String[] getjdbcDataSources() {
        final String methodName = "getjdbcDataSources()";
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(tc, methodName, this);

        final Collection<JDBCDataSourceMBeanImpl> c = dataSourceMBeanChildrenList.values();
        final int size = c.size();
        final String[] result = new String[size];
        int index = 0;
        for (JDBCDataSourceMBeanImpl mbeanItem : c)
            result[index++] = mbeanItem.getobjectName();

        if (trace && tc.isEntryEnabled())
            Tr.exit(tc, methodName, this);
        return result;
        //return dataSourcesList.toArray(new String[dataSourcesList.size()]);
    }
264179
public function prepareDataSource(array $dataSource)
    {
        if (isset($dataSource['data']['items'])) {
            $config = $this->getConfiguration();
            $name   = $config['fieldName'] ?? $this->getName();
            foreach ($dataSource['data']['items'] as & $item) {
                $item[$name] = ($item[$name] ? __('Yes') : __('No'));
            }
        }

        return parent::prepareDataSource($dataSource);
    }
1178694
public function toArray(): array
    {
        $data = [
            'meta'     => $this->getMetadata(),
            'links'    => $this->linksToArray(),
            'errors'   => $this->errorsToArray(),
            'included' => $this->includedResourcesToArray()
        ];

        $data = array_filter($data, 'count');

        if ($this->jsonApi !== null) {
            $data['jsonapi'] = $this->jsonApi->toArray();
        }

        return $data;
    }
217692
public function getConnectionsFromResource() : Array
	{	
		$baseDir = dirname(__DIR__);
		$configLocation = $baseDir . '/config.php';
	
		if (!file_exists($configLocation) && class_exists(Config::class)) {
			$resourceConfig = Config::get('database');
		}else{
			$resourceConfig = include $configLocation;
		}

		if (gettype($resourceConfig) !== 'array') {
			throw new Exception('Invalid configuration type.');
		}
		
		return $resourceConfig;
	}
1128158
public function toArray()
    {
        $this->setHtmlAttribute('data-display', class_basename($this->getDisplay()));

        return [
            'filters' => $this->columnFilters,
            'attributes' => $this->htmlAttributesToString(),
            'tag' => $this->getPlacement() == 'table.header' ? 'thead' : 'tfoot',
        ];
    }
237393
protected function _getData()
    {
        $data = array();

        if (isset($this->_query)) {
            $data = $this->getRepository()->fetch($this->_query, AnDomain::FETCH_ENTITY_LIST);
        }

        return $data;
    }