<commit_before><?php

/*
 * This file is part of the BluemesaCoreBundle.
 * 
 * Copyright (c) 2016 BlueMesa LabDB Contributors <<EMAIL>>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Bluemesa\Bundle\CoreBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

/**
 * Base class for controllers
 *
 * @author <NAME> <<EMAIL>>
 */
class AbstractController extends Controller
{
    /**
     * Get object manager
     *
     * @param  object|string $object
     * @return Bluemesa\Bundle\CoreBundle\Doctrine\ObjectManager
     */
    protected function getObjectManager($object = null)
    {
        echo "Calling getManagerForClass($object)\n";
        return $this->get('bluemesa.core.doctrine.registry')->getManagerForClass($object);
    }

    /**
     * Get session
     *
     * @return Symfony\Component\HttpFoundation\Session\SessionInterface
     */
    protected function getSession()
    {
        return $this->get('session');
    }

    /**
     * Get paginator
     *
     * @return Knp\Component\Pager\Paginator
     */
    protected function getPaginator()
    {
        return $this->get('knp_paginator');
    }

    /**
     * Get current page
     *
     * @return integer<commit_msg>Debugging doctrine<commit_after><?php

/*
 * This file is part of the BluemesaCoreBundle.
 * 
 * Copyright (c) 2016 BlueMesa LabDB Contributors <<EMAIL>>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Bluemesa\Bundle\CoreBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

/**
 * Base class for controllers
 *
 * @author <NAME> <<EMAIL>>
 */
class AbstractController extends Controller
{
    /**
     * Get object manager
     *
     * @param  object|string $object
     * @return Bluemesa\Bundle\CoreBundle\Doctrine\ObjectManager
     */
    protected function getObjectManager($object = null)
    {
        return $this->get('bluemesa.core.doctrine.registry')->getManagerForClass($object);
    }

    /**
     * Get session
     *
     * @return Symfony\Component\HttpFoundation\Session\SessionInterface
     */
    protected function getSession()
    {
        return $this->get('session');
    }

    /**
     * Get paginator
     *
     * @return Knp\Component\Pager\Paginator
     */
    protected function getPaginator()
    {
        return $this->get('knp_paginator');
    }

    /**
     * Get current page
     *
     * @return integer
{'fraction_non_alphanumeric': 0.1137678364828384, 'fraction_numerical': 0.0030852294639413806, 'mean_word_length': 2.7270114942528734, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, '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': '6697878', 'n_tokens_mistral': 756, 'n_tokens_neox': 735, 'n_words': 175}