@param PaginateFinderConfiguration $configuration
@param Stage                       $qa

@return array
502557
protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa)
    {
        $qa->match(array('extra.site_id' => $configuration->getSearchIndex('site_id')));

        $userName = $configuration->getSearchIndex('user_name');
        if (null !== $userName && '' !== $userName) {
            $qa->match(array('extra.user_name' => new \MongoRegex('/.*' . $userName . '.*/i')));
        }

        $userIP = $configuration->getSearchIndex('user_ip');
        if (null !== $userIP && '' !== $userIP) {
            $qa->match(array('extra.user_ip' => new \MongoRegex('/.*' . $userIP . '.*/i')));
        }

        $date = $configuration->getSearchIndex('date');
        if (null !== $date && '' !== $date) {
            $dateFormat = $configuration->getSearchIndex('date-format');
            if (null !== $dateFormat && '' !== $dateFormat) {
                $dateFormat = str_replace('yy', 'Y', $dateFormat);
                $dateFormat = str_replace('mm', 'm', $dateFormat);
                $dateFormat = str_replace('dd', 'd', $dateFormat);
                $date = \DateTime::createFromFormat($dateFormat, $date)->format('Y-m-d');
                $qa->match(array('datetime' => new \MongoRegex('/' . $date . '.*/i')));
            }
        }

        return $qa;
    }
1306791
public function getIndexQueueMappedFieldsByConfigurationName($configurationName = '', $defaultIfEmpty = [])
    {
        $mappingConfiguration = $this->getIndexQueueFieldsConfigurationByConfigurationName($configurationName);
        $mappedFieldNames = $this->getOnlyArrayKeysWhereValueIsNotAnArray($mappingConfiguration);
        return count($mappedFieldNames) == 0 ? $defaultIfEmpty : $mappedFieldNames;
    }
777558
private function getCollectionBy($configuration)
    {
        if (!$configuration) {
            return null;
        }

        $db = $this->connection->selectDB($configuration['db']);
        return $db->{$configuration['collection']};
    }
549121
public static function getAllowedPageTypes($pageId, $configurationName = 'pages')
    {
        $rootPath = '';
        $configuration = self::getConfigurationFromPageId($pageId, $rootPath);
        return $configuration->getIndexQueueAllowedPageTypesArrayByConfigurationName($configurationName);
    }
238388
protected static function loadAdditionalConfiguration(Configuration $configuration)
    {
        if (null !== ($pattern = $configuration->getAdditionalConfigurationDirectory())) {
            $iterator = new \DirectoryIterator(sprintf($pattern, dirname($configuration->getIdentity())));
            foreach ($iterator as $file) {
                $configuration->merge(Configuration::createFromFile($file->getRealPath()));
            }
        }
    }
1248580
private function getAllClassNames(Configuration $configuration)
    {
        if (!$this->classNames) {
            $this->classNames = $configuration->getMetadataDriverImpl()->getAllClassNames();
        }

        return $this->classNames;
    }
811384
public function findForPaginate(PaginateFinderConfiguration $configuration, $language)
    {
        $qa = $this->createAggregationQuery();

        $this->filterSearch($configuration, $language, $qa);

        $order = $configuration->getOrder();
        if (!empty($order)) {
            $qa->sort($order);
        }

        $qa->skip($configuration->getSkip());
        $qa->limit($configuration->getLimit());

        return $this->hydrateAggregateQuery($qa);
    }
1243635
protected function buildFilters(array $configuration)
    {
        $this->io->text('- Building filters...');
        $builder = new FilterBuilder($this->eventDispatcher);

        $filters = $builder->build($configuration);

        $this->io->text('- Filters build !');
        $this->io->newLine();

        return $filters;
    }
916294
private function disableCache(array $configuration): array
    {
        if (isset($this->options['force']) && $this->options['force']) {
            $configuration['phpdocumentor']['use-cache'] = false;
        }

        return $configuration;
    }
1372780
public function extract(array $configuration, array $requestData, $listSpotName)
    {
        $data = isset($requestData[$listSpotName]) ? $requestData[$listSpotName] : array();
        foreach ($this->extractorList as $extractor) {
            $data = array_merge_recursive($data, $extractor->extract($configuration, $requestData, $listSpotName));
        }

        reset($this->extractorList);

        return $data;
    }
1352318
public function getStoreLevelAmqpConfigurations(Mage_Core_Model_Store $store)
    {
        $coreConfig = $this->_coreHelper->getConfigModel($store);
        $amqpConfig = $this->_helper->getConfigModel($store);
        return array(
            'store_id' => $coreConfig->storeId,
            'username' => $amqpConfig->username,
            'password' => $amqpConfig->password,
        );
    }
1358782
protected function getNegationWhenConfigured($value, $configuration)
    {
        if (!is_array($configuration) || empty($configuration['negate']) || (bool)$configuration['negate'] === false) {
            return $value;
        }

        return !((bool)$value);
    }
616351
private function parseConfiguration($configuration)
    {
        $return = [];
        foreach ($configuration as $page) {
            foreach ($page as $key => $setting) {
                if ($key == 'helpers') {
                    foreach ($setting as $a => $b) {
                        if (!isset($return['renderers'])) {
                            $return['renderers'] = array();
                        }
                        if (!isset($return['renderers'][$a])) {
                            $return['renderers'][$a] = array();
                        }
                        if (!isset($return['renderers'][$a]['helpers'])) {
                            $return['renderers'][$a]['helpers'] = array();
                        }
                        $return['renderers'][$a]['helpers'] = array_replace($return['renderers'][$a]['helpers'], $b);
                    }
                } else {
                    $return[$key] = $setting;
                }
            }
        }
        return $return;
    }
526255
protected function loadConfigurationRecursive(ContainerBuilder $container, array $configuration)
    {
        foreach ($configuration as $values) {
            $loader = new XmlFileLoader($container, new FileLocator($values['path']));
            foreach ($values['configFiles'] as $configFile) {
                $loader->load($configFile);
            }
            if (array_key_exists('configuration', $values)) {
                $this->loadConfigurationRecursive($container, $values['configuration']);
            }
        }
    }
683819
public function getChildren(ConfigurationInterface $configuration)
    {
        $children = [];

        foreach ($this->configurations as $child) {
            if ($child->getParentId() === $configuration->getResourceId()) {
                $children[$child->getResourceName()] = $child;
            }
        }

        return $children;
    }
23562
private function getStaticAnalysisVisitors(Configuration $configuration)
    {
        return array(
            $symbolTableVariableResolverVisitor = new SymbolTableVariableResolverVisitor(
                $this->getSymbolTableVariableResolver($configuration),
                $this->symbolTable
            ),

            // the constructor resolver should be registered last
            new ConstructorResolverVisitor(
                new ConstructorResolver(
                    $this->symbolTable,
                    array(
                        $symbolTableVariableResolverVisitor,
                    )
                )
            ),
        );
    }
68172
public function getIndexQueueConfigurationByName($configurationName, array $defaultIfEmpty = [])
    {
        $path = 'plugin.tx_solr.index.queue.' . $configurationName . '.';
        $result = $this->getObjectByPathOrDefault($path, $defaultIfEmpty);
        return $result;
    }