Commit 3dcaba40 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Premier commit.

parent a89cc7a2
Loading
Loading
Loading
Loading

Module.php

0 → 100644
+34 −0
Original line number Diff line number Diff line
<?php

namespace UnicaenLeocarte;

use Zend\Mvc\ModuleRouteListener;
use Zend\Mvc\MvcEvent;

class Module
{
    public function onBootstrap(MvcEvent $e)
    {
        $application = $e->getApplication();
        $application->getServiceManager()->get('translator');
        $eventManager = $application->getEventManager();
        $moduleRouteListener = new ModuleRouteListener();
        $moduleRouteListener->attach($eventManager);
    }

    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }

    public function getAutoloaderConfig()
    {
        return [
            'Zend\Loader\StandardAutoloader' => [
                'namespaces' => [
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ],
            ],
        ];
    }
}

composer.json

0 → 100755
+26 −0
Original line number Diff line number Diff line
{
    "name": "unicaen/unicaen-leocarte",
    "description": "Module de communication avec le web service des Leocartes",
    "repositories": [
        {
            "type": "composer",
            "url": "https://dev.unicaen.fr/packagist"
        }
    ],
    "require": {
        "ext-soap":                                 "*",
        "zendframework/zend-servicemanager":		"^2.4",
        "zendframework/zend-mvc":		            "^2.4",
        "zendframework/zend-http":		            "^2.4",
        "zendframework/zend-soap":		            "^2.4",
        "zendframework/zend-stdlib":		        "^2.4"
    },
    "autoload": {
        "psr-0": {
            "UnicaenLeocarte": "src/"
        },
        "classmap": [
            "./Module.php"
        ]
    }
}

composer.lock

0 → 100644
+1110 −0

File added.

Preview size limit exceeded, changes collapsed.

composer.phar

0 → 100755
+1.63 MiB

File added.

No diff preview for this file type.

+65 −0
Original line number Diff line number Diff line
<?php

namespace UnicaenLeocarte;

return [
    'bjyauthorize'    => [
        'guards' => [
            'UnicaenAuth\Guard\PrivilegeController' => [
                [
                    'controller' => 'UnicaenLeocarte\Controller\Index',
                    'action'     => [
                        'photo',
                    ],
//                    'privileges' => \UnicaenLeocarte\Provider\Privilege\ThesePrivileges::THESE_RECHERCHE,
                    'roles' => ['guest'],
                ],
            ],
        ],
    ],
    'router'          => [
        'routes' => [
            'leocarte' => [
                'type'          => 'Literal',
                'options'       => [
                    'route'    => '/leocarte',
                    'defaults' => [
                        'controller' => 'UnicaenLeocarte\Controller\Index',
                    ],
                ],
                'may_terminate' => false,
                'child_routes'  => [
                    'photo' => [
                        'type'    => 'Segment',
                        'options' => [
                            'route'       => '/photo/:id',
                            'constraints' => [
                                'id' => '[0-9]+',
                            ],
                            'defaults'    => [
                                'action' => 'photo',
                            ],
                        ],
                    ],
                ],
            ],
        ],
    ],
    'service_manager' => [
        'factories' => [
            'UnicaenLeocarte\Options'      => Options\ModuleOptionsFactory::class,
            'UnicaenLeocarte\Service\Soap' => Service\Soap\LeocarteSoapServiceFactory::class,
        ],
    ],

    'controllers'  => [
        'factories' => [
            'UnicaenLeocarte\Controller\Index' => Controller\IndexControllerFactory::class,
        ],
    ],
    'view_manager' => [
        'template_path_stack' => [
            __DIR__ . '/../view',
        ],
    ],
];
 No newline at end of file
Loading