Skip to content
Snippets Groups Projects
Commit db291ad1 authored by Thomas Hamel's avatar Thomas Hamel
Browse files

presque

parent 477b520c
No related branches found
No related tags found
No related merge requests found
Pipeline #37059 passed
<?php
namespace UnicaenIcs;
use Laminas\Config\Factory as ConfigFactory;
use Laminas\Mvc\ModuleRouteListener;
use Laminas\Mvc\MvcEvent;
use Laminas\Stdlib\ArrayUtils;
use Laminas\Stdlib\Glob;
/**
* @author Laurent LECLUSE <laurent.lecluse at unicaen.fr>
*/
class Module
{
public function onBootstrap(MvcEvent $e): void
{
$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__,
),
),
);
}
}
\ No newline at end of file
...@@ -10,9 +10,7 @@ ...@@ -10,9 +10,7 @@
"require": { "require": {
}, },
"autoload": { "autoload": {
"psr-4": { "psr-0": [],
"UnicaenIcs\\": "src/UnicaenIcs/"
},
"classmap": [ "classmap": [
"./Module.php" "./Module.php"
] ]
......
<?php
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
return [
'doctrine' => [
'driver' => [
'orm_default' => [
'class' => MappingDriverChain::class,
'drivers' => [
'UnicaenIcs\Entity\Db' => 'orm_default_xml_driver',
],
],
'orm_default_xml_driver' => [
'class' => XmlDriver::class,
'cache' => 'apc',
'paths' => [
__DIR__ . '/../src/UnicaenIcs/Entity/Db/Mapping',
],
],
],
'cache' => [
'apc' => [
'namespace' => 'UNICAEN-ICS__' . __NAMESPACE__,
],
],
],
'view_manager' => [
'template_path_stack' => [
__DIR__ . '/../view',
],
],
'view_helpers' => [
'aliases' => [
],
'factories' => [
],
],
'public_files' => [
'stylesheets' => [
// '11000_mail' => 'css/unicaen-ics.css',
],
],
];
\ No newline at end of file
<?php
namespace UnicaenIcs\Entity\Db;
class Invitation{
private ?int $id = null;
}
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping https://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="UnicaenIcs\Entity\Db\Invitation" table="unicaen_ics_invitation">
<id name="id" type="integer" column="id">
<generator strategy="AUTO"/>
</id>
</entity>
</doctrine-mapping>
//test
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment