AppserverIo\Appserver\Core\Api\Node\DatasourcesNode::getDatasourcesAsArray PHP Method

getDatasourcesAsArray() public method

Return's an array with the datasources.
public getDatasourcesAsArray ( ) : array
return array The array with datasources
    public function getDatasourcesAsArray()
    {
        // initialize the array
        $datasources = array();
        // prepare the array with the datasources
        foreach ($this->getDatasources() as $datasource) {
            $datasources[$datasource->getPrimaryKey()] = $datasource;
        }
        // return the array with the datasources
        return $datasources;
    }