FOSElasticaBundle/Event/TypeResetEvent.php

50 lines
961 B
PHP
Raw Normal View History

2015-03-11 04:30:10 +01:00
<?php
/**
* 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;
use Symfony\Component\EventDispatcher\Event;
/**
2015-03-12 11:45:24 +01:00
* Type ResetEvent.
2015-03-11 04:30:10 +01:00
*
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/
2015-03-13 09:34:56 +01:00
class TypeResetEvent extends IndexEvent
2015-03-11 04:30:10 +01:00
{
const PRE_TYPE_RESET = 'elastica.index.type_pre_reset';
const POST_TYPE_RESET = 'elastica.index.type_post_reset';
/**
* @var string
*/
private $type;
/**
* @param string $index
* @param string $type
*/
public function __construct($index, $type)
{
2015-03-13 09:34:56 +01:00
parent::__construct($index);
2015-03-11 04:30:10 +01:00
2015-03-13 09:34:56 +01:00
$this->type = $type;
2015-03-11 04:30:10 +01:00
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}