src/Factory/DataProviderFactory.php
public function add($id, DataProviderInterface $dataProvider)
    {
        if ($this->has($id)) {
            throw new Exception('Trying to add the data provider '.$id.' twice');
        }
        // add the data provider to collection, indexed by ids
        $this->dataProviders[$id] = $dataProvider;
    }
public function add($id, DataProviderInterface $dataProvider)
    {
        if ($this->has($id)) {
            throw new Exception('Trying to add the data provider '.$id.' twice');
        }
        // add the data provider to collection, indexed by ids
        $this->dataProviders[$id] = $dataProvider;
    }
public function add ( $ id , DataProviderInterface $ dataProvider ) { if ( $ this -> has ( $ id ) ) { throw new Exception ( 'Trying to add the data provider ' . $ id . ' twice' ) ; } // add the data provider to collection, indexed by ids $ this -> dataProviders [ $ id ] = $ dataProvider ; }
Add a data provider to the collection.

@param string $id The data provider service id
@param DataProviderInterface $dataProvider The data provider

@throws Exception
Add a data provider to the collection .