FOSElasticaBundle/Event/TypePopulateEvent.php

52 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2014-11-21 15:25:40 +01:00
<?php
2015-03-11 04:30:10 +01:00
2014-11-21 15:25:40 +01:00
/**
* This file is part of the FOSElasticaBundle project.
*
* (c) FriendsOfSymfony <https://github.com/FriendsOfSymfony/FOSElasticaBundle/graphs/contributors>
*
* 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 Populate Event.
2014-11-21 15:25:40 +01:00
*
* @author Oleg Andreyev <oleg.andreyev@intexsys.lv>
*/
2015-03-11 04:30:10 +01:00
class TypePopulateEvent extends IndexPopulateEvent
2014-11-21 15:25:40 +01:00
{
const PRE_TYPE_POPULATE = 'elastica.index.type_pre_populate';
const POST_TYPE_POPULATE = 'elastica.index.type_post_populate';
/**
* @var string
*/
private $type;
/**
* @param string $index
* @param string $type
2015-03-12 11:45:24 +01:00
* @param bool $reset
* @param array $options
2014-11-21 15:25:40 +01:00
*/
2015-03-11 04:30:10 +01:00
public function __construct($index, $type, $reset, $options)
2014-11-21 15:25:40 +01:00
{
2015-03-11 04:30:10 +01:00
parent::__construct($index, $reset, $options);
2014-11-21 15:25:40 +01:00
2015-03-11 04:30:10 +01:00
$this->type = $type;
2014-11-21 15:25:40 +01:00
}
/**
* @return string
*/
public function getType()
{
return $this->type;
}
}