for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AmaTeam\ElasticSearch\Entity\Annotation\Listener\Indexing;
use AmaTeam\ElasticSearch\API\Annotation\Indexing\Infrastructure\OptionAnnotationInterface;
use AmaTeam\ElasticSearch\Entity\Annotation\ClassAnnotationListenerInterface;
use AmaTeam\ElasticSearch\Entity\Entity;
use ReflectionClass;
class ParameterAnnotationListener implements ClassAnnotationListenerInterface
{
public function accept(ReflectionClass $class, Entity $entity, $annotation): void
if (!($annotation instanceof OptionAnnotationInterface)) {
return;
}
$entity->getIndexing()->setOption($annotation->getParameter(), $annotation->getValue());