Ejemplo n.º 1
0
 /**
  * Sets the processor.
  *
  * @param \Devour\Processor\ProcessorInterface|string $processor
  *   The processor to use. This can be a class or pre-configured object.
  * @param array $configuration
  *   (optional) If $processor is a class string, and implements
  *   \Devour\Common\ConfigurableInterface, this configuration will be passed
  *   in on creation. Defaults to an empty array.
  *
  * @return $this
  *   The builder to use for chaining.
  */
 public function setProcessor($processor, array $configuration = [])
 {
     $processor = $this->buildClient($processor, $configuration);
     $this->commands->insert(function () use($processor) {
         $this->importer->setProcessor($processor);
     }, static::PRIMARY);
     return $this;
 }