Commit d1f4891a authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Nouveaux services financement et origine-financement.

parent 6da862d6
<?php
use ImportData\V1\Query\Provider\FetchAll;
return [
'doctrine' => [
'driver' => [
......@@ -140,6 +137,24 @@ return [
],
],
],
'import-data.rest.doctrine.origine-financement' => [
'type' => 'Segment',
'options' => [
'route' => '/origine-financement[/:origine_financement_id]',
'defaults' => [
'controller' => 'ImportData\\V1\\Rest\\OrigineFinancement\\Controller',
],
],
],
'import-data.rest.doctrine.financement' => [
'type' => 'Segment',
'options' => [
'route' => '/financement[/:financement_id]',
'defaults' => [
'controller' => 'ImportData\\V1\\Rest\\Financement\\Controller',
],
],
],
],
],
'zf-versioning' => [
......@@ -156,6 +171,8 @@ return [
9 => 'import-data.rest.doctrine.etablissement',
10 => 'import-data.rest.doctrine.unite-recherche',
11 => 'import-data.rest.version',
12 => 'import-data.rest.doctrine.origine-financement',
13 => 'import-data.rest.doctrine.financement',
],
],
'zf-rest' => [
......@@ -386,6 +403,44 @@ return [
'collection_class' => \ImportData\V1\Rest\Version\VersionCollection::class,
'service_name' => 'Version',
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => [
'listener' => \ImportData\V1\Rest\OrigineFinancement\OrigineFinancementResource::class,
'route_name' => 'import-data.rest.doctrine.origine-financement',
'route_identifier_name' => 'origine_financement_id',
'entity_identifier_name' => 'id',
'collection_name' => 'origine_financement',
'entity_http_methods' => [
0 => 'GET',
],
'collection_http_methods' => [
0 => 'GET',
],
'collection_query_whitelist' => [],
'page_size' => 25,
'page_size_param' => null,
'entity_class' => \ImportData\V1\Entity\Db\OrigineFinancement::class,
'collection_class' => \ImportData\V1\Rest\OrigineFinancement\OrigineFinancementCollection::class,
'service_name' => 'OrigineFinancement',
],
'ImportData\\V1\\Rest\\Financement\\Controller' => [
'listener' => \ImportData\V1\Rest\Financement\FinancementResource::class,
'route_name' => 'import-data.rest.doctrine.financement',
'route_identifier_name' => 'financement_id',
'entity_identifier_name' => 'id',
'collection_name' => 'financement',
'entity_http_methods' => [
0 => 'GET',
],
'collection_http_methods' => [
0 => 'GET',
],
'collection_query_whitelist' => [],
'page_size' => '100',
'page_size_param' => null,
'entity_class' => \ImportData\V1\Entity\Db\Financement::class,
'collection_class' => \ImportData\V1\Rest\Financement\FinancementCollection::class,
'service_name' => 'Financement',
],
],
'zf-content-negotiation' => [
'controllers' => [
......@@ -401,6 +456,8 @@ return [
'ImportData\\V1\\Rest\\Etablissement\\Controller' => 'HalJson',
'ImportData\\V1\\Rest\\UniteRecherche\\Controller' => 'HalJson',
'ImportData\\V1\\Rest\\Version\\Controller' => 'HalJson',
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => 'HalJson',
'ImportData\\V1\\Rest\\Financement\\Controller' => 'HalJson',
],
'accept-whitelist' => [
'ImportData\\V1\\Rest\\These\\Controller' => [
......@@ -512,6 +569,16 @@ return [
1 => 'application/hal+json',
2 => 'application/json',
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => [
0 => 'application/vnd.import-data.v1+json',
1 => 'application/hal+json',
2 => 'application/json',
],
'ImportData\\V1\\Rest\\Financement\\Controller' => [
0 => 'application/vnd.import-data.v1+json',
1 => 'application/hal+json',
2 => 'application/json',
],
],
'content_type_whitelist' => [
'ImportData\\V1\\Rest\\Structure\\Controller' => [
......@@ -551,6 +618,14 @@ return [
0 => 'application/vnd.import-data.v1+json',
1 => 'application/json',
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => [
0 => 'application/vnd.import-data.v1+json',
1 => 'application/json',
],
'ImportData\\V1\\Rest\\Financement\\Controller' => [
0 => 'application/vnd.import-data.v1+json',
1 => 'application/json',
],
],
],
'zf-hal' => [
......@@ -688,6 +763,28 @@ return [
'route_identifier_name' => 'version_id',
'is_collection' => true,
],
\ImportData\V1\Entity\Db\OrigineFinancement::class => [
'route_identifier_name' => 'origine_financement_id',
'entity_identifier_name' => 'id',
'route_name' => 'import-data.rest.doctrine.origine-financement',
'hydrator' => 'ImportData\\V1\\Rest\\OrigineFinancement\\OrigineFinancementHydrator',
],
\ImportData\V1\Rest\OrigineFinancement\OrigineFinancementCollection::class => [
'entity_identifier_name' => 'id',
'route_name' => 'import-data.rest.doctrine.origine-financement',
'is_collection' => true,
],
\ImportData\V1\Entity\Db\Financement::class => [
'route_identifier_name' => 'financement_id',
'entity_identifier_name' => 'id',
'route_name' => 'import-data.rest.doctrine.financement',
'hydrator' => 'ImportData\\V1\\Rest\\Financement\\FinancementHydrator',
],
\ImportData\V1\Rest\Financement\FinancementCollection::class => [
'entity_identifier_name' => 'id',
'route_name' => 'import-data.rest.doctrine.financement',
'is_collection' => true,
],
],
],
'zf-apigility' => [
......@@ -740,6 +837,14 @@ return [
'object_manager' => 'doctrine.entitymanager.orm_default',
'hydrator' => 'ImportData\\V1\\Rest\\UniteRecherche\\UniteRechercheHydrator',
],
\ImportData\V1\Rest\OrigineFinancement\OrigineFinancementResource::class => [
'object_manager' => 'doctrine.entitymanager.orm_default',
'hydrator' => 'ImportData\\V1\\Rest\\OrigineFinancement\\OrigineFinancementHydrator',
],
\ImportData\V1\Rest\Financement\FinancementResource::class => [
'object_manager' => 'doctrine.entitymanager.orm_default',
'hydrator' => 'ImportData\\V1\\Rest\\Financement\\FinancementHydrator',
],
],
],
'doctrine-hydrator' => [
......@@ -820,6 +925,20 @@ return [
'strategies' => [],
'use_generated_hydrator' => true,
],
'ImportData\\V1\\Rest\\OrigineFinancement\\OrigineFinancementHydrator' => [
'entity_class' => \ImportData\V1\Entity\Db\OrigineFinancement::class,
'object_manager' => 'doctrine.entitymanager.orm_default',
'by_value' => true,
'strategies' => [],
'use_generated_hydrator' => true,
],
'ImportData\\V1\\Rest\\Financement\\FinancementHydrator' => [
'entity_class' => \ImportData\V1\Entity\Db\Financement::class,
'object_manager' => 'doctrine.entitymanager.orm_default',
'by_value' => true,
'strategies' => [],
'use_generated_hydrator' => true,
],
],
'zf-content-validation' => [
'ImportData\\V1\\Rest\\These\\Controller' => [
......@@ -858,6 +977,12 @@ return [
'ImportData\\V1\\Rest\\Version\\Controller' => [
'input_filter' => 'ImportData\\V1\\Rest\\Version\\Validator',
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => [
'input_filter' => 'ImportData\\V1\\Rest\\OrigineFinancement\\Validator',
],
'ImportData\\V1\\Rest\\Financement\\Controller' => [
'input_filter' => 'ImportData\\V1\\Rest\\Financement\\Validator',
],
],
'input_filter_specs' => [
'ImportData\\V1\\Rest\\These\\Validator' => [
......@@ -1840,6 +1965,216 @@ return [
'field_type' => 'string',
],
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Validator' => [
0 => [
'name' => 'sourceId',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 6,
],
],
],
],
1 => [
'name' => 'codOfi',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 8,
],
],
],
],
2 => [
'name' => 'licOfi',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 10,
],
],
],
],
3 => [
'name' => 'libOfi',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 50,
],
],
],
],
],
'ImportData\\V1\\Rest\\Financement\\Validator' => [
0 => [
'name' => 'sourceId',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 6,
],
],
],
],
1 => [
'name' => 'theseId',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StripTags::class,
],
1 => [
'name' => \Zend\Filter\Digits::class,
],
],
'validators' => [],
],
2 => [
'name' => 'annee',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 8,
],
],
],
],
3 => [
'name' => 'origineFinancementId',
'required' => true,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 8,
],
],
],
],
4 => [
'name' => 'complementFinancement',
'required' => false,
'filters' => [
0 => [
'name' => \Zend\Filter\StringTrim::class,
],
1 => [
'name' => \Zend\Filter\StripTags::class,
],
],
'validators' => [
0 => [
'name' => \Zend\Validator\StringLength::class,
'options' => [
'min' => 1,
'max' => 40,
],
],
],
],
5 => [
'name' => 'quotiteFinancement',
'required' => false,
'filters' => [
0 => [
'name' => \Zend\Filter\StripTags::class,
],
1 => [
'name' => \Zend\Filter\Digits::class,
],
],
'validators' => [],
],
6 => [
'name' => 'dateDebutFinancement',
'required' => false,
'filters' => [],
'validators' => [],
],
7 => [
'name' => 'dateFinFinancement',
'required' => false,
'filters' => [],
'validators' => [],
],
],
],
'zf-mvc-auth' => [
'authorization' => [
......@@ -2035,6 +2370,38 @@ return [
'DELETE' => false,
],
],
'ImportData\\V1\\Rest\\OrigineFinancement\\Controller' => [
'collection' => [
'GET' => true,
'POST' => false,
'PUT' => false,
'PATCH' => false,
'DELETE' => false,
],
'entity' => [
'GET' => true,
'POST' => false,
'PUT' => false,
'PATCH' => false,
'DELETE' => false,
],
],
'ImportData\\V1\\Rest\\Financement\\Controller' => [
'collection' => [
'GET' => true,
'POST' => false,
'PUT' => false,
'PATCH' => false,
'DELETE' => false,
],
'entity' => [
'GET' => true,
'POST' => false,
'PUT' => false,
'PATCH' => false,
'DELETE' => false,
],
],
],
],
'service_manager' => [
......
<?php
namespace ImportData\V1\Entity\Db;
/**
* Financement
*/
class Financement
{
protected $id;
protected $sourceId;
protected $theseId;
protected $annee;
protected $origineFinancementId;
protected $complementFinancement;
protected $quotiteFinancement;
protected $dateDebutFinancement;
protected $dateFinFinancement;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getSourceId()
{
return $this->sourceId;
}
/**
* @return mixed
*/
public function getTheseId()
{
return $this->theseId;
}
/**
* @return mixed
*/
public function getAnnee()
{
return $this->annee;
}
/**
* @return mixed
*/
public function getOrigineFinancementId()
{
return $this->origineFinancementId;
}
/**
* @return mixed
*/
public function getComplementFinancement()
{
return $this->complementFinancement;
}
/**
* @return mixed
*/
public function getQuotiteFinancement()
{
return $this->quotiteFinancement;
}
/**
* @return mixed
*/
public function getDateDebutFinancement()
{
return $this->dateDebutFinancement;
}
/**
* @return mixed
*/
public function getDateFinFinancement()
{
return $this->dateFinFinancement;
}
}
\ 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 http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V1\Entity\Db\Financement" table="SYGAL_FINANCEMENT">
<id name="id" type="string" length="8" column="ID"/>
<field name="sourceId" column="SOURCE_ID" length="6"/>
<field name="theseId" type="integer" column="THESE_ID"/>
<field name="annee" column="ANNEE_ID" length="8"/>
<field name="origineFinancementId" column="ORIGINE_FINANCEMENT_ID" length="8"/>
<field name="complementFinancement" column="COMPLEMENT_FINANCEMENT" length="40" nullable="true"/>
<field name="quotiteFinancement" type="integer" column="QUOTITE_FINANCEMENT" nullable="true"/>
<field name="dateDebutFinancement" type="datetime" column="DATE_DEBUT_FINANCEMENT" nullable="true"/>
<field name="dateFinFinancement" type="datetime" column="DATE_FIN_FINANCEMENT" nullable="true"/>
</entity>
</doctrine-mapping>
<?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 http://doctrine-project.org/schemas/orm/doctrine-mapping.xsd">
<entity name="ImportData\V1\Entity\Db\OrigineFinancement" table="SYGAL_ORIGINE_FINANCEMENT">
<id name="id" type="string" length="8" column="ID"/>
<field name="sourceId" length="6" column="SOURCE_ID"/>
<field name="codOfi" length="8" column="COD_OFI"/>
<field name="licOfi" length="10" column="LIC_OFI"/>
<field name="libOfi" length="50" column="LIB_OFI"/>
</entity>
</doctrine-mapping>
\ No newline at end of file
<?php
namespace ImportData\V1\Entity\Db;
/**
* OrigineFinancement
*/
class OrigineFinancement
{
protected $id;
protected $sourceId;
protected $codOfi;
protected $licOfi;
protected $libOfi;
/**
* @return mixed
*/
public function getId()
{
return $this->id;
}
/**