<?php
/**
 * Perforce Swarm, Community Development
 *
 * @copyright   2014 Perforce Software. All rights reserved.
 * @license     Please see LICENSE.txt in top-level folder of this distribution.
 * @version     <release>/<patch>
 */

return array(
    'avatar' => array(
        'splashHeight'  => 255,
        'splashWidth'   => 900
    ),
    'router' => array(
        'routes' => array(
            'projectAddAvatar' => array(
                'type' => 'Zend\Mvc\Router\Http\Segment',
                'options' => array(
                    'route'    => '/project[s]/add[/]',
                    'defaults' => array(
                        'controller' => 'Avatar\Controller\Index',
                        'action'     => 'projectAdd',
                    ),
                ),
                'priority' => 5000,
            ),
            'projectEditAvatar' => array(
                'type'          => 'Zend\Mvc\Router\Http\Segment',
                'options'       => array(
                    'route'         => '/project[s]/edit/:project[/]',
                    'defaults'      => array(
                        'controller'    => 'Avatar\Controller\Index',
                        'action'        => 'projectEdit'
                    ),
                ),
                'priority' => 5000,
            ),
            'projectImage' => array(
                'type'      => 'Zend\Mvc\Router\Http\Segment',
                'options'   => array(
                    'route'     => '/projects/:project/image/:type[/:size][/format/:format]',
                    'defaults'  => array(
                        'controller' => 'Avatar\Controller\Index',
                        'action'     => 'project',
                        'size'       => null,
                    )
                )
            )
        )
    ),
    'controllers' => array(
        'invokables' => array(
            'Avatar\Controller\Index' => 'Avatar\Controller\IndexController',
        ),
    ),
    'view_helpers' => array(
        'invokables' => array(
            'projectAvatar' => 'Avatar\View\Helper\Avatar',
            'projectSplash' => 'Avatar\View\Helper\Splash'
        ),
    ),
    'view_manager' => array(
        'template_map' => array(
            'avatar/index/project-edit' => __DIR__ . '/../../Projects/view/projects/index/edit.phtml',
            'avatar/index/project-add'  => __DIR__ . '/../../Projects/view/projects/index/add.phtml',
            'avatar/index/project'      => __DIR__ . '/../view/avatar/index/project.phtml'
        ),
    ),
);