public function getDataSources(string $indexName)
    {
        $sources = [];

        if (isset($this->datasources[$indexName]) && isset($this->datasources[$indexName])) {
            foreach ($this->datasources[$indexName] as $name => $datasource) {
                if (!$datasource instanceof \Smile\ElasticsuiteCore\Api\Index\DatasourceInterface) {
                    throw new \InvalidArgumentException(
                        'Datasource must implement ' . \Smile\ElasticsuiteCore\Api\Index\DatasourceInterface::class
                    );
                }
                $sources[$name] = $datasource;
            }
        }

        return $sources;
    }
public function getDataSources(string $indexName)
    {
        $sources = [];

        if (isset($this->datasources[$indexName]) && isset($this->datasources[$indexName])) {
            foreach ($this->datasources[$indexName] as $name => $datasource) {
                if (!$datasource instanceof \Smile\ElasticsuiteCore\Api\Index\DatasourceInterface) {
                    throw new \InvalidArgumentException(
                        'Datasource must implement ' . \Smile\ElasticsuiteCore\Api\Index\DatasourceInterface::class
                    );
                }
                $sources[$name] = $datasource;
            }
        }

        return $sources;
    }
public function getDataSources ( string $ indexName ) { $ sources = [ ] ; if ( isset ( $ this -> datasources [ $ indexName ] ) && isset ( $ this -> datasources [ $ indexName ] ) ) { foreach ( $ this -> datasources [ $ indexName ] as $ name => $ datasource ) { if ( ! $ datasource instanceof \ Smile \ ElasticsuiteCore \ Api \ Index \ DatasourceInterface ) { throw new \ InvalidArgumentException ( 'Datasource must implement ' . \ Smile \ ElasticsuiteCore \ Api \ Index \ DatasourceInterface :: class ) ; } $ sources [ $ name ] = $ datasource ; } } return $ sources ; }
Get Data sources of a given index.

@param string $indexName The index name.

@return \Smile\ElasticsuiteCore\Api\Index\DatasourceInterface[]
Get Data sources of a given index .