Commit c02985bd authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

INIT

parents
Loading
Loading
Loading
Loading
Loading

.gitignore

0 → 100644
+1 −0
Original line number Diff line number Diff line
.idea
 No newline at end of file

.gitlab-ci.yml

0 → 100644
+14 −0
Original line number Diff line number Diff line
image: registre.unicaen.fr:5000/unicaen-dev-php7.3-apache

stages:
- publish

cache:
  key: ${CI_COMMIT_REF_SLUG}
  paths:
  - vendor/

update-satis:
  stage: publish
  script:
    - curl https://gest.unicaen.fr/packagist/update

Module.php

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

namespace UnicaenAide;

use Laminas\Config\Factory as ConfigFactory;
use Laminas\Mvc\ModuleRouteListener;
use Laminas\Mvc\MvcEvent;
use Laminas\Stdlib\ArrayUtils;
use Laminas\Stdlib\Glob;

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

    public function getConfig()
    {
        $configInit = [
            __DIR__ . '/config/module.config.php'
        ];
        $configFiles = ArrayUtils::merge(
            $configInit,
            Glob::glob(__DIR__ . '/config/merged/{,*.}{config}.php', Glob::GLOB_BRACE)
        );

        return ConfigFactory::fromFiles($configFiles);
    }


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

composer.json

0 → 100644
+21 −0
Original line number Diff line number Diff line
{
  "name": "unicaen/aide",
  "description": "Module proposant un menu d'aide",
  "repositories": [
    {
      "type": "composer",
      "url": "https://gest.unicaen.fr/packagist"
    }
  ],
  "require": {
    "unicaen/app":                                  "^5",
    "unicaen/privilege":                            "^5"
  },
  "autoload": {
    "psr-0": {
    },
    "classmap": [
      "./Module.php"
    ]
  }
}

config/example.php

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

namespace UnicaenParametre;

use UnicaenPrivilege\Guard\PrivilegeController;
use Laminas\Router\Http\Literal;
use Laminas\Router\Http\Segment;

return [
    'bjyauthorize' => [
        'guards' => [
            PrivilegeController::class => [

            ],
        ],
    ],

    'router'          => [
        'routes' => [
        ],
    ],

    'service_manager' => [
        'factories' => [],
    ],
    'controllers'     => [
        'factories' => [],
    ],
    'form_elements' => [
        'factories' => [],
    ],
    'hydrators' => [
        'factories' => [],
    ]

];
 No newline at end of file
Loading