private function getAnalyzers(\ReflectionClass $reflectionClass)
    {
        $analyzers = [];

        foreach ($this->getDocumentPropertiesReflection($reflectionClass) as $name => $property) {
            $directory = $this->guessDirName($property->getDeclaringClass());

            $type = $this->getPropertyAnnotationData($property);
            $type = $type !== null ? $type : $this->getEmbeddedAnnotationData($property);

            if ($type instanceof Embedded) {
                $analyzers = array_merge(
                    $analyzers,
                    $this->getAnalyzers(new \ReflectionClass($this->finder->getNamespace($type->class, $directory)))
                );
            }

            if ($type instanceof Property) {
                if (isset($type->options['analyzer'])) {
                    $analyzers[] = $type->options['analyzer'];
                }
                if (isset($type->options['search_analyzer'])) {
                    $analyzers[] = $type->options['search_analyzer'];
                }

                if (isset($type->options['fields'])) {
                    foreach ($type->options['fields'] as $field) {
                        if (isset($field['analyzer'])) {
                            $analyzers[] = $field['analyzer'];
                        }
                        if (isset($field['search_analyzer'])) {
                            $analyzers[] = $field['search_analyzer'];
                        }
                    }
                }
            }
        }
        return array_unique($analyzers);
    }
private function getAnalyzers(\ReflectionClass $reflectionClass)
    {
        $analyzers = [];

        foreach ($this->getDocumentPropertiesReflection($reflectionClass) as $name => $property) {
            $directory = $this->guessDirName($property->getDeclaringClass());

            $type = $this->getPropertyAnnotationData($property);
            $type = $type !== null ? $type : $this->getEmbeddedAnnotationData($property);

            if ($type instanceof Embedded) {
                $analyzers = array_merge(
                    $analyzers,
                    $this->getAnalyzers(new \ReflectionClass($this->finder->getNamespace($type->class, $directory)))
                );
            }

            if ($type instanceof Property) {
                if (isset($type->options['analyzer'])) {
                    $analyzers[] = $type->options['analyzer'];
                }
                if (isset($type->options['search_analyzer'])) {
                    $analyzers[] = $type->options['search_analyzer'];
                }

                if (isset($type->options['fields'])) {
                    foreach ($type->options['fields'] as $field) {
                        if (isset($field['analyzer'])) {
                            $analyzers[] = $field['analyzer'];
                        }
                        if (isset($field['search_analyzer'])) {
                            $analyzers[] = $field['search_analyzer'];
                        }
                    }
                }
            }
        }
        return array_unique($analyzers);
    }
private function getAnalyzers ( \ ReflectionClass $ reflectionClass ) { $ analyzers = [ ] ; foreach ( $ this -> getDocumentPropertiesReflection ( $ reflectionClass ) as $ name => $ property ) { $ directory = $ this -> guessDirName ( $ property -> getDeclaringClass ( ) ) ; $ type = $ this -> getPropertyAnnotationData ( $ property ) ; $ type = $ type !== null ? $ type : $ this -> getEmbeddedAnnotationData ( $ property ) ; if ( $ type instanceof Embedded ) { $ analyzers = array_merge ( $ analyzers , $ this -> getAnalyzers ( new \ ReflectionClass ( $ this -> finder -> getNamespace ( $ type -> class , $ directory ) ) ) ) ; } if ( $ type instanceof Property ) { if ( isset ( $ type -> options [ 'analyzer' ] ) ) { $ analyzers [ ] = $ type -> options [ 'analyzer' ] ; } if ( isset ( $ type -> options [ 'search_analyzer' ] ) ) { $ analyzers [ ] = $ type -> options [ 'search_analyzer' ] ; } if ( isset ( $ type -> options [ 'fields' ] ) ) { foreach ( $ type -> options [ 'fields' ] as $ field ) { if ( isset ( $ field [ 'analyzer' ] ) ) { $ analyzers [ ] = $ field [ 'analyzer' ] ; } if ( isset ( $ field [ 'search_analyzer' ] ) ) { $ analyzers [ ] = $ field [ 'search_analyzer' ] ; } } } } } return array_unique ( $ analyzers ) ; }
Parses analyzers list from document mapping.

@param \ReflectionClass $reflectionClass
@return array
Parses analyzers list from document mapping .