for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This software package is licensed under `AGPL-3.0-only, proprietary` license[s].
*
* @package maslosoft/manganel
* @license AGPL-3.0-only, proprietary
* @copyright Copyright (c) Peter Maselkowski <[email protected]>
* @link https://maslosoft.com/manganel/
*/
namespace Maslosoft\Manganel\Annotations;
use Maslosoft\Manganel\Manganel;
use Maslosoft\Manganel\Meta\ManganelTypeAnnotation;
* Search Index Annotation
* This annotation must be set to index document. Might be with empty value.
* Use this to set Manganel configuration ID. This does **not** set index name,
* use `Manganel`'s property `name` to set index name.
* Most simple example:
* ```
* @SearchIndex
* @Target('class')
* @author Piotr Maselkowski <pmaselkowski at gmail.com>
class SearchIndexAnnotation extends ManganelTypeAnnotation
{
const Ns = __NAMESPACE__;
* Index ID. This points to Manganel configuration instance.
* @var string
public $value = null;
public function init()
if (null === $this->value)
$this->value = Manganel::DefaultIndexId;
}
$this->getEntity()->indexId = $this->value;