<commit_before><?php

namespace Mapbender\SearchBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Class MapbenderController
 *
 * @package Mapbender\SearchBundle\Controller
 * @author  <NAME> <<EMAIL>>
 */
class MapbenderController extends Controller implements ContainerAwareInterface
{


    const MAPBENDER_QUERY_MANAGER    = "mapbender.query.manager";
    const MAPBENDER_STYLE_MANAGER    = "mapbender.style.manager";
    const MAPBENDER_SECURITY_CONTEXT = "security.context";


    /**@var boolean */
    protected $containerSet = false;


    /**
     * Override this method to have desired services injected.
     *
     * @return string[]
     */
    protected function mappings()
    {
        return array();
    }

    /**
     * MapbenderController constructor.
     *
     * @param ContainerInterface|null $container
     */
    public function __construct(ContainerInterface $container = null)
    {
        if ($container) {
            $this->setContainer($container);
        }
    }

    /**
     * Sets the container.
     *
     * @param ContainerInterface|null $container A ContainerInterface instance or null
     */
    public function setContainer(ContainerInterface $container = null)
    {
        $this->container    = $container;
        $this->containerSet = true;
        if ($this->containerSet) {
            foreach ($this->mappings() as $key => $mapping) {
                $this->{$key} = $this->container->get($mapping);
            }

        }
    }
}<commit_msg>Add new service name constants to controller base class<commit_after><?php

namespace Mapbender\SearchBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Class MapbenderController
 *
 * @package Mapbender\SearchBundle\Controller
 * @author  <NAME> <<EMAIL>>
 */
class MapbenderController extends Controller implements ContainerAwareInterface
{

    const MAPBENDER_FEATURE_SERVICE  = "features";
    const MAPBENDER_QUERY_MANAGER    = "mapbender.query.manager";
    const MAPBENDER_STYLE_MANAGER    = "mapbender.style.manager";
    const MAPBENDER_FEATURE_MANAGER  = "mapbender.featuretype.manager";
    const MAPBENDER_SECURITY_CONTEXT = "security.context";


    /**@var boolean */
    protected $containerSet = false;


    /**
     * Override this method to have desired services injected.
     *
     * @return string[]
     */
    protected function mappings()
    {
        return array();
    }

    /**
     * MapbenderController constructor.
     *
     * @param ContainerInterface|null $container
     */
    public function __construct(ContainerInterface $container = null)
    {
        if ($container) {
            $this->setContainer($container);
        }
    }

    /**
     * Sets the container.
     *
     * @param ContainerInterface|null $container A ContainerInterface instance or null
     */
    public function setContainer(ContainerInterface $container = null)
    {
        $this->container    = $container;
        $this->containerSet = true;
        if ($this->containerSet) {
            foreach ($this->mappings() as $key => $mapping) {
                $this->{$key} = $this->container->get($mapping);
            }

        }
    }
}
{'fraction_non_alphanumeric': 0.1070406410990269, 'fraction_numerical': 0.0, 'mean_word_length': 2.840659340659341, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6626165', 'n_tokens_mistral': 975, 'n_tokens_neox': 947, 'n_words': 200}