FOSElasticaBundle/Event/IndexResetEvent.php

71 lines
1.3 KiB
PHP
Raw Normal View History

<?php
2015-03-11 04:30:10 +01:00
/**
* This file is part of the FOSElasticaBundle project.
*
* (c) Infinite Networks Pty Ltd <http://www.infinite.net.au>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FOS\ElasticaBundle\Event;
/**
2015-03-12 11:45:24 +01:00
* Index ResetEvent.
*
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/
2015-03-13 09:34:56 +01:00
class IndexResetEvent extends IndexEvent
{
const PRE_INDEX_RESET = 'elastica.index.pre_reset';
const POST_INDEX_RESET = 'elastica.index.post_reset';
/**
2015-03-11 04:30:10 +01:00
* @var bool
*/
2015-03-11 04:30:10 +01:00
private $force;
/**
* @var bool
*/
private $populating;
/**
2015-03-11 04:30:10 +01:00
* @param string $index
* @param bool $populating
* @param bool $force
*/
2015-03-11 04:30:10 +01:00
public function __construct($index, $populating, $force)
{
2015-03-13 09:34:56 +01:00
parent::__construct($index);
2015-03-11 04:30:10 +01:00
$this->force = $force;
$this->populating = $populating;
}
/**
2015-03-11 04:30:10 +01:00
* @return boolean
*/
2015-03-11 04:30:10 +01:00
public function isForce()
{
2015-03-11 04:30:10 +01:00
return $this->force;
}
/**
* @return boolean
*/
public function isPopulating()
{
return $this->populating;
}
/**
2015-03-11 04:30:10 +01:00
* @param boolean $force
*/
2015-03-11 04:30:10 +01:00
public function setForce($force)
{
2015-03-11 04:30:10 +01:00
$this->force = $force;
}
2015-03-11 04:30:10 +01:00
}