Exemplo n.º 1
0
 /**
  * @param  \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
  *
  * @throws \Sherlock\common\exceptions\BadMethodCallException
  * @internal param $node
  */
 public function __construct($dispatcher)
 {
     if (!isset($dispatcher)) {
         throw new \Sherlock\common\exceptions\BadMethodCallException("Dispatcher argument required for IndexRequest");
     }
     $this->dispatcher = $dispatcher;
     parent::__construct($dispatcher);
 }
Exemplo n.º 2
0
 /**
  * @param  \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
  *
  * @throws \Sherlock\common\exceptions\BadMethodCallException
  * @internal param $node
  */
 public function __construct($dispatcher)
 {
     if (!isset($dispatcher)) {
         throw new \Sherlock\common\exceptions\BadMethodCallException("Dispatcher argument required for IndexRequest");
     }
     $this->dispatcher = $dispatcher;
     $this->params['index'] = array();
     $this->params['type'] = array();
     $this->currentCommand = null;
     $this->params['update'] = false;
     $this->params['updateScript'] = null;
     $this->params['updateParams'] = null;
     $this->params['updateUpsert'] = null;
     $this->params['doc'] = null;
     parent::__construct($dispatcher);
 }
Exemplo n.º 3
0
 /**
  * @param \Symfony\Component\EventDispatcher\EventDispatcher $dispatcher
  * @param                                                    $index
  *
  * @throws \Sherlock\common\exceptions\BadMethodCallException
  * @internal param $node
  */
 public function __construct($dispatcher, $index)
 {
     if (!isset($dispatcher)) {
         throw new \Sherlock\common\exceptions\BadMethodCallException("Dispatcher argument required for IndexRequest");
     }
     if (!isset($index)) {
         throw new \Sherlock\common\exceptions\BadMethodCallException("Index argument required for IndexRequest");
     }
     $this->dispatcher = $dispatcher;
     if (!is_array($index)) {
         $this->params['index'][] = $index;
     } else {
         $this->params['index'] = $index;
     }
     $this->params['indexSettings'] = array();
     $this->params['indexMappings'] = array();
     parent::__construct($dispatcher);
 }