AppserverIo\Appserver\Core\Api\DatasourceService::findAll PHP Method

findAll() public method

Returns all deployed applications.
See also: AppserverIo\Appserver\Core\Api\ServiceInterface::findAll()
public findAll ( ) : array<\AppserverIo\Appserver\Core\Api\Node\DatasourceNode>
return array<\AppserverIo\Appserver\Core\Api\Node\DatasourceNode>
    public function findAll()
    {
        $datasourceNodes = array();
        foreach ($this->getSystemConfiguration()->getDatasources() as $datasourceNode) {
            $datasourceNodes[$datasourceNode->getPrimaryKey()] = $datasourceNode;
        }
        return $datasourceNodes;
    }

Usage Example

 /**
  * Test if the findAll() method returns the correct number of elements.
  *
  * @return null
  */
 public function testFindAll()
 {
     $this->assertCount(0, $this->service->findAll());
 }