<commit_before><?php
namespace Application;

return array(
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        'controller' => 'Application\Controller\Album',
                        'action'     => 'index',
                    ),
                ),
            ),
            'album' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/album[/][:action][/:id]',
                    'constraints' => array(
                         'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                         'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Application\Controller\Album',
                        'action'     => 'index',
                    ),
                ),
            ),
            'user' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/user',
                    'defaults' => array(
                        'controller'    => 'Application\Controller\User',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'login' => array(
                        'type'    => 'Literal',
                        'options' => array(
                            'route'    => '/login',
                            'defaults' => array(
                                'controller' => 'Application\Controller\User',
                                'action'     => 'login',
                            ),
                        ),
                    ),
                    'process' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/[:action]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                            ),
                        ),
                    ),
                    'success' => array(
                        'type'    => 'Literal',
                        'options' => array(
                            'route'    => '/success',
                            'defaults' => array(
                                'controller' => 'Application\Controller\User',
                                'action'     => 'loginsuccess',
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
    'controllers' => array(
        'invokables' => array(
            //'Application\Controller\Album' => 'Application\Controller\AlbumController',
        ),
        'factories' => array(
            'Application\Controller\Album' => function(\Zend\Mvc\Controller\ControllerManager $controllerManager) {
                $serviceLocator = $controllerManager->getServiceLocator();

                $controller = new \Application\Controller\AlbumController(
                    $serviceLocator->get('Zend\Authentication\AuthenticationService'),
                    $serviceLocator->get('Application\Service\Album')
                );

                return $controller;
            },
            'Application\Controller\User' => function(\Zend\Mvc\Controller\ControllerManager $controllerManager) {
                $serviceLocator = $controllerManager->getServiceLocator();

                $controller = new \Application\Controller\UserController(
                    $serviceLocator->get('Zend\Authentication\AuthenticationService'),
                    $serviceLocator->get('Application\Service\User'),
                    $serviceLocator->get('Application\Service\AuthStorage')
                );

                return $controller;
            },
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            // Log
            'Zend\Log\Logger' => function($sm){
                $logger = new \Zend\Log\Logger;
                $writer = new \Zend\Log\Writer\Stream('./data/log/'.date('Y-m-d').'-error.log');

                $logger->addWriter($writer);

                return $logger;
            },
            // Services
            'Application\Service\Album' => function($serviceManager) {
                $service = new \Application\Service\Album();
                $service->setApplicationForm(
                    $serviceManager->get('Application\Form\AlbumForm')
                );

                return $service;
            },
            // Forms
            'Application\Form\AlbumForm' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\Album')->getInputFilter();
                $form = new \Application\Form\AlbumForm($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
            'Application\Form\User\Login' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\User')->getInputFilter();
                $form = new \Application\Form\User\Login($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
            'Application\Form\User\Registration' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\User')->getInputFilter();
                $form = new \Application\Form\User\Registration($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
        ),
        'invokables' => array(
            // Entities
            'Application\Entity\Album' => 'Application\Entity\Album',
            'Application\Entity\User' => 'Application\Entity\User',
            // Service
            'Application\Service\User' => 'Application\Service\User',
            'Application\Service\AuthStorage' => 'Application\Service\AuthStorage',
        ),
        'aliases' => array(
            'translator' => 'MvcTranslator',
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),<commit_msg>update zfcuser_doctrine_em<commit_after><?php
namespace Application;

return array(
    'router' => array(
        'routes' => array(
            'home' => array(
                'type' => 'Zend\Mvc\Router\Http\Literal',
                'options' => array(
                    'route'    => '/',
                    'defaults' => array(
                        'controller' => 'Application\Controller\Album',
                        'action'     => 'index',
                    ),
                ),
            ),
            'album' => array(
                'type'    => 'segment',
                'options' => array(
                    'route'    => '/album[/][:action][/:id]',
                    'constraints' => array(
                         'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                         'id'     => '[0-9]+',
                    ),
                    'defaults' => array(
                        'controller' => 'Application\Controller\Album',
                        'action'     => 'index',
                    ),
                ),
            ),
            'user' => array(
                'type'    => 'Literal',
                'options' => array(
                    'route'    => '/user',
                    'defaults' => array(
                        'controller'    => 'Application\Controller\User',
                        'action'        => 'index',
                    ),
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'login' => array(
                        'type'    => 'Literal',
                        'options' => array(
                            'route'    => '/login',
                            'defaults' => array(
                                'controller' => 'Application\Controller\User',
                                'action'     => 'login',
                            ),
                        ),
                    ),
                    'process' => array(
                        'type'    => 'Segment',
                        'options' => array(
                            'route'    => '/[:action]',
                            'constraints' => array(
                                'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
                                'action'     => '[a-zA-Z][a-zA-Z0-9_-]*',
                            ),
                            'defaults' => array(
                            ),
                        ),
                    ),
                    'success' => array(
                        'type'    => 'Literal',
                        'options' => array(
                            'route'    => '/success',
                            'defaults' => array(
                                'controller' => 'Application\Controller\User',
                                'action'     => 'loginsuccess',
                            ),
                        ),
                    ),
                ),
            ),
        ),
    ),
    'controllers' => array(
        'invokables' => array(
            //'Application\Controller\Album' => 'Application\Controller\AlbumController',
        ),
        'factories' => array(
            'Application\Controller\Album' => function(\Zend\Mvc\Controller\ControllerManager $controllerManager) {
                $serviceLocator = $controllerManager->getServiceLocator();

                $controller = new \Application\Controller\AlbumController(
                    $serviceLocator->get('Zend\Authentication\AuthenticationService'),
                    $serviceLocator->get('Application\Service\Album')
                );

                return $controller;
            },
            'Application\Controller\User' => function(\Zend\Mvc\Controller\ControllerManager $controllerManager) {
                $serviceLocator = $controllerManager->getServiceLocator();

                $controller = new \Application\Controller\UserController(
                    $serviceLocator->get('Zend\Authentication\AuthenticationService'),
                    $serviceLocator->get('Application\Service\User'),
                    $serviceLocator->get('Application\Service\AuthStorage')
                );

                return $controller;
            },
        ),
    ),
    'service_manager' => array(
        'factories' => array(
            // Log
            'Zend\Log\Logger' => function($sm){
                $logger = new \Zend\Log\Logger;
                $writer = new \Zend\Log\Writer\Stream('./data/log/'.date('Y-m-d').'-error.log');

                $logger->addWriter($writer);

                return $logger;
            },
            // Services
            'Application\Service\Album' => function($serviceManager) {
                $service = new \Application\Service\Album();
                $service->setApplicationForm(
                    $serviceManager->get('Application\Form\AlbumForm')
                );

                return $service;
            },
            // Forms
            'Application\Form\AlbumForm' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\Album')->getInputFilter();
                $form = new \Application\Form\AlbumForm($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
            'Application\Form\User\Login' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\User')->getInputFilter();
                $form = new \Application\Form\User\Login($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
            'Application\Form\User\Registration' => function ($sm) {
                $inputFilter = $sm->get('Application\Entity\User')->getInputFilter();
                $form = new \Application\Form\User\Registration($sm);
                $form->setInputFilter($inputFilter);

                return $form;
            },
        ),
        'invokables' => array(
            // Entities
            'Application\Entity\Album' => 'Application\Entity\Album',
            'Application\Entity\User' => 'Application\Entity\User',
            // Service
            'Application\Service\User' => 'Application\Service\User',
            'Application\Service\AuthStorage' => 'Application\Service\AuthStorage',
        ),
        'aliases' => array(
            'translator' => 'MvcTranslator',
            'zfcuser_doctrine_em' => 'Doctrine\ORM\EntityManager',
        ),
    ),
    'translator' => array(
        'locale' => 'en_US',
        'translation_file_patterns' => array(
            array(
                'type'     => 'gettext',
                'base_dir' => __DIR__ . '/../language',
                'pattern'  => '%s.mo',
            ),
{'fraction_non_alphanumeric': 0.140625, 'fraction_numerical': 0.001184834123222749, 'mean_word_length': 1.088940448569219, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 194, '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': '2639825', 'n_tokens_mistral': 3323, 'n_tokens_neox': 3124, 'n_words': 457}