Example #1
0
 /**
  * @param DataSourceInterface $dataSource
  */
 public function addDataSource(DataSourceInterface $dataSource)
 {
     $name = $dataSource->getName();
     $this->dataSources[$name] = $dataSource;
 }
 /**
  * Add a Data Source.
  *
  * @param DataSourceInterface $dataSource Data Source
  */
 public function addDataSource(DataSourceInterface $dataSource)
 {
     $this->dataSources[$dataSource->dataSourceId()] = $dataSource;
 }
 /**
  * run the conversion
  * @return null
  */
 public function run()
 {
     $this->convertTo->setData($this->convertFrom->getData());
     $this->convertTo->write();
 }
Example #4
0
 /**
  * Attach a data source implementing DataSourceInterface. This source will be queried each
  * time the Facet is computed to match the resulting IDs with string terms.
  *
  * @param DataSourceInterface $datasource Data source object.
  * @param array $options Source configuration options.
  */
 public function attachDataSource(DataSourceInterface $datasource, array $options = null)
 {
     $this->_datasource = $datasource;
     if ($options) {
         $this->setSource($options);
     }
     // if attaching a Facet to itself, add the source attribute to the Sphinx selection
     if ($datasource instanceof Facet && $datasource->getName() === $this->getName()) {
         $this->_set_select .= ', ' . $this->_source['name'];
     }
 }