AppserverIo\Appserver\Core\Api\DatasourceService::findAll PHP 메소드

findAll() 공개 메소드

Returns all deployed applications.
또한 보기: AppserverIo\Appserver\Core\Api\ServiceInterface::findAll()
public findAll ( ) : array<\AppserverIo\Appserver\Core\Api\Node\DatasourceNode>
리턴 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());
 }