public function findByName($name)
    {
        foreach ($this->findAll() as $datasourceNode) {
            if ($datasourceNode->getName() === $name) {
                return $datasourceNode;
            }
        }
    }
public function findByName($name)
    {
        foreach ($this->findAll() as $datasourceNode) {
            if ($datasourceNode->getName() === $name) {
                return $datasourceNode;
            }
        }
    }
public function findByName ( $ name ) { foreach ( $ this -> findAll ( ) as $ datasourceNode ) { if ( $ datasourceNode -> getName ( ) === $ name ) { return $ datasourceNode ; } } }
Returns the datasource with the passed name.

@param string $name Name of the datasource to return

@return \AppserverIo\Psr\ApplicationServer\Configuration\DatasourceConfigurationInterface The datasource with the name passed as parameter
Returns the datasource with the passed name .