From 552b21d8d3462614fec55fdd21e415949149f82d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr> Date: Fri, 19 Jan 2018 13:15:42 +0100 Subject: [PATCH] =?UTF-8?q?Creation=20du=20WebService=20These=20cot=C3=A9?= =?UTF-8?q?=20Unicaen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- composer.lock | 175 ++++---- config/autoload/global.php | 5 - config/modules.config.old | 53 +-- config/modules.config.php | 10 +- module/FirstRest/Module.php | 23 - module/FirstRest/config/module.config.php | 367 ---------------- .../FirstRest/src/V1/Entity/Db/Doctorant.php | 400 ------------------ .../FirstRest.V1.Entity.Db.Doctorant.dcm.xml | 26 -- .../V1/Rest/Doctorant/DoctorantCollection.php | 8 - .../V1/Rest/Doctorant/DoctorantResource.php | 8 - .../src/V1/Rest/Ping/PingCollection.php | 8 - .../FirstRest/src/V1/Rest/Ping/PingEntity.php | 60 --- .../src/V1/Rest/Ping/PingResource.php | 113 ----- .../src/V1/Rest/Ping/PingResourceFactory.php | 10 - .../ImportData.V1.Entity.Db.These.dcm.xml | 25 ++ module/ImportData/src/V1/Entity/Db/These.php | 302 +++++++++++++ 17 files changed, 449 insertions(+), 1146 deletions(-) delete mode 100644 module/FirstRest/Module.php delete mode 100644 module/FirstRest/config/module.config.php delete mode 100644 module/FirstRest/src/V1/Entity/Db/Doctorant.php delete mode 100644 module/FirstRest/src/V1/Entity/Db/Mapping/FirstRest.V1.Entity.Db.Doctorant.dcm.xml delete mode 100644 module/FirstRest/src/V1/Rest/Doctorant/DoctorantCollection.php delete mode 100644 module/FirstRest/src/V1/Rest/Doctorant/DoctorantResource.php delete mode 100644 module/FirstRest/src/V1/Rest/Ping/PingCollection.php delete mode 100644 module/FirstRest/src/V1/Rest/Ping/PingEntity.php delete mode 100644 module/FirstRest/src/V1/Rest/Ping/PingResource.php delete mode 100644 module/FirstRest/src/V1/Rest/Ping/PingResourceFactory.php create mode 100644 module/ImportData/src/V1/Entity/Db/Mapping/ImportData.V1.Entity.Db.These.dcm.xml create mode 100644 module/ImportData/src/V1/Entity/Db/These.php diff --git a/composer.json b/composer.json index 1bb32de..048c5d2 100644 --- a/composer.json +++ b/composer.json @@ -49,7 +49,7 @@ "autoload": { "psr-4": { "Application\\": "module/Application/src/", - "FirstRest\\": "module/FirstRest/src/" + "ImportData\\": "module/ImportData/src/" } }, "autoload-dev": { diff --git a/composer.lock b/composer.lock index d976cf8..046835e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,6 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], + "hash": "bfa8b69e8fb8722c233e6d61c47cfd4c", "content-hash": "26de5b07b606187d5e116e8caa92e79e", "packages": [ { @@ -41,7 +42,7 @@ } ], "description": "Corrects DoctrineModule classes to use zend-hydrator", - "time": "2016-06-12T20:55:02+00:00" + "time": "2016-06-12 20:55:02" }, { "name": "bshaffer/oauth2-server-php", @@ -99,7 +100,7 @@ "oauth", "oauth2" ], - "time": "2017-11-15T01:41:02+00:00" + "time": "2017-11-15 01:41:02" }, { "name": "container-interop/container-interop", @@ -130,7 +131,7 @@ ], "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", "homepage": "https://github.com/container-interop/container-interop", - "time": "2017-02-14T19:40:03+00:00" + "time": "2017-02-14 19:40:03" }, { "name": "doctrine/annotations", @@ -198,7 +199,7 @@ "docblock", "parser" ], - "time": "2017-02-24T16:22:25+00:00" + "time": "2017-02-24 16:22:25" }, { "name": "doctrine/cache", @@ -268,7 +269,7 @@ "cache", "caching" ], - "time": "2017-07-22T12:49:21+00:00" + "time": "2017-07-22 12:49:21" }, { "name": "doctrine/collections", @@ -335,7 +336,7 @@ "collections", "iterator" ], - "time": "2017-01-03T10:49:41+00:00" + "time": "2017-01-03 10:49:41" }, { "name": "doctrine/common", @@ -408,7 +409,7 @@ "persistence", "spl" ], - "time": "2017-07-22T08:35:12+00:00" + "time": "2017-07-22 08:35:12" }, { "name": "doctrine/dbal", @@ -479,7 +480,7 @@ "persistence", "queryobject" ], - "time": "2017-07-22T20:44:48+00:00" + "time": "2017-07-22 20:44:48" }, { "name": "doctrine/doctrine-module", @@ -571,7 +572,7 @@ "module", "zf" ], - "time": "2016-10-03T19:40:55+00:00" + "time": "2016-10-03 19:40:55" }, { "name": "doctrine/doctrine-orm-module", @@ -659,7 +660,7 @@ "orm", "zf" ], - "time": "2017-09-20T01:06:34+00:00" + "time": "2017-09-20 01:06:34" }, { "name": "doctrine/inflector", @@ -726,7 +727,7 @@ "singularize", "string" ], - "time": "2017-07-22T12:18:28+00:00" + "time": "2017-07-22 12:18:28" }, { "name": "doctrine/instantiator", @@ -780,7 +781,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2015-06-14 21:17:01" }, { "name": "doctrine/lexer", @@ -834,7 +835,7 @@ "lexer", "parser" ], - "time": "2014-09-09T13:34:57+00:00" + "time": "2014-09-09 13:34:57" }, { "name": "doctrine/orm", @@ -910,7 +911,7 @@ "database", "orm" ], - "time": "2017-12-17T02:57:51+00:00" + "time": "2017-12-17 02:57:51" }, { "name": "michelf/php-markdown", @@ -956,7 +957,7 @@ "keywords": [ "markdown" ], - "time": "2018-01-15T00:49:33+00:00" + "time": "2018-01-15 00:49:33" }, { "name": "paragonie/random_compat", @@ -1004,7 +1005,7 @@ "pseudorandom", "random" ], - "time": "2017-09-27T21:40:39+00:00" + "time": "2017-09-27 21:40:39" }, { "name": "phpro/zf-doctrine-hydration-module", @@ -1065,7 +1066,7 @@ "hydrator", "zf2" ], - "time": "2016-10-05T06:33:09+00:00" + "time": "2016-10-05 06:33:09" }, { "name": "psr/container", @@ -1114,7 +1115,7 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "time": "2017-02-14 16:28:37" }, { "name": "psr/log", @@ -1161,7 +1162,7 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2016-10-10 12:19:37" }, { "name": "symfony/console", @@ -1230,7 +1231,7 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-01-03T07:37:34+00:00" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/debug", @@ -1286,7 +1287,7 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-01-03T17:14:19+00:00" + "time": "2018-01-03 17:14:19" }, { "name": "symfony/polyfill-mbstring", @@ -1345,7 +1346,7 @@ "portable", "shim" ], - "time": "2017-10-11T12:05:26+00:00" + "time": "2017-10-11 12:05:26" }, { "name": "zendframework/zend-authentication", @@ -1407,7 +1408,7 @@ "Authentication", "zf2" ], - "time": "2016-02-28T15:02:34+00:00" + "time": "2016-02-28 15:02:34" }, { "name": "zendframework/zend-cache", @@ -1476,7 +1477,7 @@ "cache", "zf2" ], - "time": "2016-12-16T11:35:47+00:00" + "time": "2016-12-16 11:35:47" }, { "name": "zendframework/zend-component-installer", @@ -1528,7 +1529,7 @@ "plugin", "zf" ], - "time": "2018-01-11T15:06:04+00:00" + "time": "2018-01-11 15:06:04" }, { "name": "zendframework/zend-config", @@ -1588,7 +1589,7 @@ "config", "zf2" ], - "time": "2017-02-22T14:31:10+00:00" + "time": "2017-02-22 14:31:10" }, { "name": "zendframework/zend-crypt", @@ -1639,7 +1640,7 @@ "crypt", "zf2" ], - "time": "2017-07-17T15:46:00+00:00" + "time": "2017-07-17 15:46:00" }, { "name": "zendframework/zend-db", @@ -1697,7 +1698,7 @@ "db", "zf" ], - "time": "2017-12-11T14:57:52+00:00" + "time": "2017-12-11 14:57:52" }, { "name": "zendframework/zend-escaper", @@ -1741,7 +1742,7 @@ "escaper", "zf2" ], - "time": "2016-06-30T19:48:38+00:00" + "time": "2016-06-30 19:48:38" }, { "name": "zendframework/zend-eventmanager", @@ -1795,7 +1796,7 @@ "events", "zf2" ], - "time": "2017-07-11T19:17:22+00:00" + "time": "2017-07-11 19:17:22" }, { "name": "zendframework/zend-filter", @@ -1855,7 +1856,7 @@ "filter", "zf2" ], - "time": "2017-05-17T20:56:17+00:00" + "time": "2017-05-17 20:56:17" }, { "name": "zendframework/zend-form", @@ -1933,7 +1934,7 @@ "form", "zf" ], - "time": "2017-12-06T21:09:08+00:00" + "time": "2017-12-06 21:09:08" }, { "name": "zendframework/zend-http", @@ -1986,7 +1987,7 @@ "zend", "zf" ], - "time": "2017-10-13T12:06:24+00:00" + "time": "2017-10-13 12:06:24" }, { "name": "zendframework/zend-hydrator", @@ -2048,7 +2049,7 @@ "hydrator", "zf2" ], - "time": "2017-10-02T15:01:27+00:00" + "time": "2017-10-02 15:01:27" }, { "name": "zendframework/zend-inputfilter", @@ -2104,7 +2105,7 @@ "inputfilter", "zf" ], - "time": "2017-12-04T21:24:25+00:00" + "time": "2017-12-04 21:24:25" }, { "name": "zendframework/zend-json", @@ -2154,7 +2155,7 @@ "json", "zf" ], - "time": "2018-01-04T17:51:34+00:00" + "time": "2018-01-04 17:51:34" }, { "name": "zendframework/zend-loader", @@ -2198,7 +2199,7 @@ "loader", "zf2" ], - "time": "2015-06-03T14:05:47+00:00" + "time": "2015-06-03 14:05:47" }, { "name": "zendframework/zend-math", @@ -2248,7 +2249,7 @@ "math", "zf2" ], - "time": "2016-04-28T17:37:42+00:00" + "time": "2016-04-28 17:37:42" }, { "name": "zendframework/zend-modulemanager", @@ -2308,7 +2309,7 @@ "modulemanager", "zf" ], - "time": "2017-12-02T06:11:18+00:00" + "time": "2017-12-02 06:11:18" }, { "name": "zendframework/zend-mvc", @@ -2380,7 +2381,7 @@ "mvc", "zf" ], - "time": "2017-11-24T06:32:07+00:00" + "time": "2017-11-24 06:32:07" }, { "name": "zendframework/zend-paginator", @@ -2445,7 +2446,7 @@ "paginator", "zf2" ], - "time": "2017-11-01T20:49:42+00:00" + "time": "2017-11-01 20:49:42" }, { "name": "zendframework/zend-permissions-acl", @@ -2494,7 +2495,7 @@ "acl", "zf2" ], - "time": "2016-02-03T21:46:45+00:00" + "time": "2016-02-03 21:46:45" }, { "name": "zendframework/zend-permissions-rbac", @@ -2539,7 +2540,7 @@ "rbac", "zf2" ], - "time": "2015-06-03T14:05:54+00:00" + "time": "2015-06-03 14:05:54" }, { "name": "zendframework/zend-router", @@ -2600,7 +2601,7 @@ "routing", "zf2" ], - "time": "2016-05-31T20:47:48+00:00" + "time": "2016-05-31 20:47:48" }, { "name": "zendframework/zend-servicemanager", @@ -2663,7 +2664,7 @@ "servicemanager", "zf" ], - "time": "2017-11-27T18:11:25+00:00" + "time": "2017-11-27 18:11:25" }, { "name": "zendframework/zend-stdlib", @@ -2708,7 +2709,7 @@ "stdlib", "zf2" ], - "time": "2016-09-13T14:38:50+00:00" + "time": "2016-09-13 14:38:50" }, { "name": "zendframework/zend-uri", @@ -2755,7 +2756,7 @@ "uri", "zf2" ], - "time": "2016-02-17T22:38:51+00:00" + "time": "2016-02-17 22:38:51" }, { "name": "zendframework/zend-validator", @@ -2826,7 +2827,7 @@ "validator", "zf2" ], - "time": "2017-08-22T14:19:23+00:00" + "time": "2017-08-22 14:19:23" }, { "name": "zendframework/zend-view", @@ -2913,7 +2914,7 @@ "view", "zf2" ], - "time": "2017-03-21T15:05:56+00:00" + "time": "2017-03-21 15:05:56" }, { "name": "zfcampus/zf-api-problem", @@ -2970,7 +2971,7 @@ "zend", "zf2" ], - "time": "2017-07-24T13:48:49+00:00" + "time": "2017-07-24 13:48:49" }, { "name": "zfcampus/zf-apigility", @@ -3043,7 +3044,7 @@ "framework", "zf2" ], - "time": "2016-07-28T13:47:39+00:00" + "time": "2016-07-28 13:47:39" }, { "name": "zfcampus/zf-apigility-doctrine", @@ -3118,7 +3119,7 @@ "framework", "zf" ], - "time": "2016-10-17T14:35:27+00:00" + "time": "2016-10-17 14:35:27" }, { "name": "zfcampus/zf-apigility-documentation", @@ -3179,7 +3180,7 @@ "zend", "zf2" ], - "time": "2016-10-11T18:32:18+00:00" + "time": "2016-10-11 18:32:18" }, { "name": "zfcampus/zf-apigility-provider", @@ -3225,7 +3226,7 @@ "framework", "zf2" ], - "time": "2016-07-13T18:03:54+00:00" + "time": "2016-07-13 18:03:54" }, { "name": "zfcampus/zf-configuration", @@ -3280,7 +3281,7 @@ "zend", "zf2" ], - "time": "2017-11-14T23:07:10+00:00" + "time": "2017-11-14 23:07:10" }, { "name": "zfcampus/zf-content-negotiation", @@ -3346,7 +3347,7 @@ "zend", "zf2" ], - "time": "2017-11-21T16:19:30+00:00" + "time": "2017-11-21 16:19:30" }, { "name": "zfcampus/zf-content-validation", @@ -3407,7 +3408,7 @@ "zend", "zf2" ], - "time": "2017-11-06T17:18:49+00:00" + "time": "2017-11-06 17:18:49" }, { "name": "zfcampus/zf-development-mode", @@ -3456,7 +3457,7 @@ "framework", "zf2" ], - "time": "2017-01-09T23:34:49+00:00" + "time": "2017-01-09 23:34:49" }, { "name": "zfcampus/zf-hal", @@ -3517,7 +3518,7 @@ "zend", "zf2" ], - "time": "2016-07-28T14:13:49+00:00" + "time": "2016-07-28 14:13:49" }, { "name": "zfcampus/zf-mvc-auth", @@ -3577,7 +3578,7 @@ "zend", "zf2" ], - "time": "2016-09-30T15:49:02+00:00" + "time": "2016-09-30 15:49:02" }, { "name": "zfcampus/zf-oauth2", @@ -3644,7 +3645,7 @@ "oauth2", "zf2" ], - "time": "2016-07-10T23:11:53+00:00" + "time": "2016-07-10 23:11:53" }, { "name": "zfcampus/zf-rest", @@ -3710,7 +3711,7 @@ "zf2", "zf3" ], - "time": "2016-10-11T21:16:15+00:00" + "time": "2016-10-11 21:16:15" }, { "name": "zfcampus/zf-rpc", @@ -3768,7 +3769,7 @@ "zend", "zf2" ], - "time": "2016-10-11T19:47:59+00:00" + "time": "2016-10-11 19:47:59" }, { "name": "zfcampus/zf-versioning", @@ -3824,7 +3825,7 @@ "zend", "zf2" ], - "time": "2016-07-13T20:03:22+00:00" + "time": "2016-07-13 20:03:22" } ], "packages-dev": [ @@ -3887,7 +3888,7 @@ "validate" ], "abandoned": "kherge/json", - "time": "2013-10-30T16:51:34+00:00" + "time": "2013-10-30 16:51:34" }, { "name": "herrera-io/phar-update", @@ -3945,7 +3946,7 @@ "update" ], "abandoned": true, - "time": "2013-10-30T17:23:01+00:00" + "time": "2013-10-30 17:23:01" }, { "name": "justinrainbow/json-schema", @@ -4011,7 +4012,7 @@ "json", "schema" ], - "time": "2016-01-25T15:43:01+00:00" + "time": "2016-01-25 15:43:01" }, { "name": "kherge/version", @@ -4054,7 +4055,7 @@ "description": "A parsing and comparison library for semantic versioning.", "homepage": "http://github.com/kherge/Version", "abandoned": true, - "time": "2012-08-16T17:13:03+00:00" + "time": "2012-08-16 17:13:03" }, { "name": "seld/jsonlint", @@ -4103,7 +4104,7 @@ "parser", "validator" ], - "time": "2018-01-03T12:13:57+00:00" + "time": "2018-01-03 12:13:57" }, { "name": "zendframework/zend-code", @@ -4156,7 +4157,7 @@ "code", "zf2" ], - "time": "2016-10-24T13:23:32+00:00" + "time": "2016-10-24 13:23:32" }, { "name": "zendframework/zend-console", @@ -4208,7 +4209,7 @@ "console", "zf2" ], - "time": "2016-02-09T17:15:12+00:00" + "time": "2016-02-09 17:15:12" }, { "name": "zendframework/zend-debug", @@ -4257,7 +4258,7 @@ "debug", "zf2" ], - "time": "2015-06-03T14:05:35+00:00" + "time": "2015-06-03 14:05:35" }, { "name": "zendframework/zend-developer-tools", @@ -4334,7 +4335,7 @@ "module", "zf2" ], - "time": "2016-09-08T13:53:58+00:00" + "time": "2016-09-08 13:53:58" }, { "name": "zfcampus/zf-apigility-admin", @@ -4415,7 +4416,7 @@ "framework", "zf2" ], - "time": "2017-12-14T22:56:47+00:00" + "time": "2017-12-14 22:56:47" }, { "name": "zfcampus/zf-apigility-admin-ui", @@ -4466,37 +4467,37 @@ "framework", "zf2" ], - "time": "2016-12-19T17:46:02+00:00" + "time": "2016-12-19 17:46:02" }, { "name": "zfcampus/zf-asset-manager", - "version": "1.2.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/zfcampus/zf-asset-manager.git", - "reference": "8987509ee4d9cadd153e54cfb6c5be2ac6d51aad" + "reference": "728e24e48388ec5d759bcfa83bc588ffbea3b180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zfcampus/zf-asset-manager/zipball/8987509ee4d9cadd153e54cfb6c5be2ac6d51aad", - "reference": "8987509ee4d9cadd153e54cfb6c5be2ac6d51aad", + "url": "https://api.github.com/repos/zfcampus/zf-asset-manager/zipball/728e24e48388ec5d759bcfa83bc588ffbea3b180", + "reference": "728e24e48388ec5d759bcfa83bc588ffbea3b180", "shasum": "" }, "require": { - "composer-plugin-api": "^1.1", + "composer-plugin-api": "^1.0", "php": "^5.6 || ^7.0" }, "require-dev": { "composer/composer": ">=1.0.0-alpha10", "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "phpunit/phpunit": "^4.8", "squizlabs/php_codesniffer": "^2.6.2" }, "type": "composer-plugin", "extra": { "branch-alias": { - "dev-master": "1.2-dev", - "dev-develop": "1.3-dev" + "dev-master": "1.1-dev", + "dev-develop": "1.2-dev" }, "class": "ZF\\AssetManager\\Plugin" }, @@ -4510,7 +4511,7 @@ "BSD-3-Clause" ], "description": "Composer plugin for copying module assets into application document roots.", - "time": "2017-11-02T22:28:50+00:00" + "time": "2016-08-12 17:10:54" }, { "name": "zfcampus/zf-composer-autoloading", @@ -4556,7 +4557,7 @@ "framework", "zf2" ], - "time": "2017-02-22T16:35:18+00:00" + "time": "2017-02-22 16:35:18" }, { "name": "zfcampus/zf-console", @@ -4609,7 +4610,7 @@ "console", "zf" ], - "time": "2017-11-27T17:17:19+00:00" + "time": "2017-11-27 17:17:19" }, { "name": "zfcampus/zf-deploy", @@ -4661,7 +4662,7 @@ "zend", "zf2" ], - "time": "2016-07-12T17:31:21+00:00" + "time": "2016-07-12 17:31:21" } ], "aliases": [], diff --git a/config/autoload/global.php b/config/autoload/global.php index 6ac3d41..809e9e0 100644 --- a/config/autoload/global.php +++ b/config/autoload/global.php @@ -1,9 +1,4 @@ <?php -/** - * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause - * @copyright Copyright (c] 2014-2016 Zend Technologies USA Inc. (http://www.zend.com] - */ - return [ 'zf-content-negotiation' => [ 'selectors' => [], diff --git a/config/modules.config.old b/config/modules.config.old index 677ebb4..e35e9b2 100644 --- a/config/modules.config.old +++ b/config/modules.config.old @@ -1,31 +1,34 @@ <?php /** - * @license http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause - * @copyright Copyright (c) 2014-2016 Zend Technologies USA Inc. (http://www.zend.com) - */ - -/** - * List of enabled modules for this application. + * Configuration file generated by ZF Apigility Admin + * + * The previous config file has been stored in ./config/modules.config.old */ return [ - 'Zend\Db', - 'Zend\Filter', - 'Zend\Hydrator', - 'Zend\InputFilter', - 'Zend\Paginator', - 'Zend\Router', - 'Zend\Validator', - 'ZF\Apigility', - 'ZF\Apigility\Documentation', - 'ZF\ApiProblem', - 'ZF\Configuration', - 'ZF\OAuth2', - 'ZF\MvcAuth', - 'ZF\Hal', - 'ZF\ContentNegotiation', - 'ZF\ContentValidation', - 'ZF\Rest', - 'ZF\Rpc', - 'ZF\Versioning', + 'Zend\\Cache', + 'Zend\\Form', + 'Zend\\Db', + 'Zend\\Filter', + 'Zend\\Hydrator', + 'Zend\\InputFilter', + 'Zend\\Paginator', + 'Zend\\Router', + 'Zend\\Validator', + 'ZF\\Apigility', + 'ZF\\Apigility\\Documentation', + 'ZF\\ApiProblem', + 'ZF\\Configuration', + 'ZF\\OAuth2', + 'ZF\\MvcAuth', + 'ZF\\Hal', + 'ZF\\ContentNegotiation', + 'ZF\\ContentValidation', + 'ZF\\Rest', + 'ZF\\Rpc', + 'ZF\\Versioning', + 'DoctrineModule', + 'DoctrineORMModule', + 'Phpro\\DoctrineHydrationModule', + 'ZF\\Apigility\\Doctrine\\Server', 'Application', ]; diff --git a/config/modules.config.php b/config/modules.config.php index 7e5b6f9..a939c55 100644 --- a/config/modules.config.php +++ b/config/modules.config.php @@ -5,8 +5,8 @@ * The previous config file has been stored in ./config/modules.config.old */ return [ - 'Zend\Cache', - 'Zend\Form', + 'Zend\\Cache', + 'Zend\\Form', 'Zend\\Db', 'Zend\\Filter', 'Zend\\Hydrator', @@ -28,8 +28,8 @@ return [ 'ZF\\Versioning', 'DoctrineModule', 'DoctrineORMModule', - 'Phpro\DoctrineHydrationModule', - 'ZF\Apigility\Doctrine\Server', + 'Phpro\\DoctrineHydrationModule', + 'ZF\\Apigility\\Doctrine\\Server', 'Application', - 'FirstRest', + 'ImportData', ]; diff --git a/module/FirstRest/Module.php b/module/FirstRest/Module.php deleted file mode 100644 index 4961520..0000000 --- a/module/FirstRest/Module.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -namespace FirstRest; - -use ZF\Apigility\Provider\ApigilityProviderInterface; - -class Module implements ApigilityProviderInterface -{ - public function getConfig() - { - return include __DIR__ . '/config/module.config.php'; - } - - public function getAutoloaderConfig() - { - return [ - 'ZF\Apigility\Autoloader' => [ - 'namespaces' => [ - __NAMESPACE__ => __DIR__ . '/src', - ], - ], - ]; - } -} diff --git a/module/FirstRest/config/module.config.php b/module/FirstRest/config/module.config.php deleted file mode 100644 index 502ab19..0000000 --- a/module/FirstRest/config/module.config.php +++ /dev/null @@ -1,367 +0,0 @@ -<?php -return [ - 'service_manager' => [ - 'factories' => [ - \FirstRest\V1\Rest\Ping\PingResource::class => \FirstRest\V1\Rest\Ping\PingResourceFactory::class, - ], - ], - 'router' => [ - 'routes' => [ - 'first-rest.rest.ping' => [ - 'type' => 'Segment', - 'options' => [ - 'route' => '/ping[/:ping_id]', - 'defaults' => [ - 'controller' => 'FirstRest\\V1\\Rest\\Ping\\Controller', - ], - ], - ], - 'first-rest.rest.doctrine.doctorant' => [ - 'type' => 'Segment', - 'options' => [ - 'route' => '/doctorant[/:doctorant_id]', - 'defaults' => [ - 'controller' => 'FirstRest\\V1\\Rest\\Doctorant\\Controller', - ], - ], - ], - ], - ], - 'zf-versioning' => [ - 'uri' => [ - 0 => 'first-rest.rest.ping', - 1 => 'first-rest.rest.doctrine.doctorant', - ], - ], - 'zf-rest' => [ - 'FirstRest\\V1\\Rest\\Ping\\Controller' => [ - 'listener' => \FirstRest\V1\Rest\Ping\PingResource::class, - 'route_name' => 'first-rest.rest.ping', - 'route_identifier_name' => 'ping_id', - 'collection_name' => 'ping', - 'entity_http_methods' => [ - 0 => 'GET', - ], - 'collection_http_methods' => [ - 0 => 'GET', - ], - 'collection_query_whitelist' => [], - 'page_size' => '25', - 'page_size_param' => null, - 'entity_class' => \FirstRest\V1\Rest\Ping\PingEntity::class, - 'collection_class' => \FirstRest\V1\Rest\Ping\PingCollection::class, - 'service_name' => 'Ping', - ], - 'FirstRest\\V1\\Rest\\Doctorant\\Controller' => [ - 'listener' => \FirstRest\V1\Rest\Doctorant\DoctorantResource::class, - 'route_name' => 'first-rest.rest.doctrine.doctorant', - 'route_identifier_name' => 'doctorant_id', - 'entity_identifier_name' => 'id', - 'collection_name' => 'doctorant', - 'entity_http_methods' => [ - 0 => 'GET', - 1 => 'PATCH', - 2 => 'PUT', - ], - 'collection_http_methods' => [ - 0 => 'GET', - 1 => 'POST', - ], - 'collection_query_whitelist' => [], - 'page_size' => '25', - 'page_size_param' => 'p', - 'entity_class' => \FirstRest\V1\Entity\Db\Doctorant::class, - 'collection_class' => \FirstRest\V1\Rest\Doctorant\DoctorantCollection::class, - 'service_name' => 'Doctorant', - ], - ], - 'zf-content-negotiation' => [ - 'controllers' => [ - 'FirstRest\\V1\\Rest\\Ping\\Controller' => 'HalJson', - 'FirstRest\\V1\\Rest\\Doctorant\\Controller' => 'HalJson', - ], - 'accept_whitelist' => [ - 'FirstRest\\V1\\Rest\\Ping\\Controller' => [ - 0 => 'application/vnd.first-rest.v1+json', - 1 => 'application/hal+json', - 2 => 'application/json', - ], - ], - 'content_type_whitelist' => [ - 'FirstRest\\V1\\Rest\\Ping\\Controller' => [ - 0 => 'application/vnd.first-rest.v1+json', - 1 => 'application/json', - ], - ], - 'accept-whitelist' => [ - 'FirstRest\\V1\\Rest\\Doctorant\\Controller' => [ - 0 => 'application/vnd.first-rest.v1+json', - 1 => 'application/hal+json', - 2 => 'application/json', - ], - ], - 'content-type-whitelist' => [ - 'FirstRest\\V1\\Rest\\Doctorant\\Controller' => [ - 0 => 'application/json', - ], - ], - ], - 'zf-hal' => [ - 'metadata_map' => [ - \FirstRest\V1\Rest\Ping\PingEntity::class => [ - 'entity_identifier_name' => 'id', - 'route_name' => 'first-rest.rest.ping', - 'route_identifier_name' => 'ping_id', - 'hydrator' => \Zend\Hydrator\ClassMethods::class, - ], - \FirstRest\V1\Rest\Ping\PingCollection::class => [ - 'entity_identifier_name' => 'id', - 'route_name' => 'first-rest.rest.ping', - 'route_identifier_name' => 'ping_id', - 'is_collection' => true, - ], - \FirstRest\V1\Entity\Db\Doctorant::class => [ - 'route_identifier_name' => 'doctorant_id', - 'entity_identifier_name' => 'id', - 'route_name' => 'first-rest.rest.doctrine.doctorant', - 'hydrator' => 'FirstRest\\V1\\Rest\\Doctorant\\DoctorantHydrator', - ], - \FirstRest\V1\Rest\Doctorant\DoctorantCollection::class => [ - 'entity_identifier_name' => 'id', - 'route_name' => 'first-rest.rest.doctrine.doctorant', - 'is_collection' => true, - ], - ], - ], - 'zf-apigility' => [ - 'doctrine-connected' => [ - \FirstRest\V1\Rest\Doctorant\DoctorantResource::class => [ - 'object_manager' => 'doctrine.entitymanager.orm_default', - 'hydrator' => 'FirstRest\\V1\\Rest\\Doctorant\\DoctorantHydrator', - ], - ], - ], - 'doctrine-hydrator' => [ - 'FirstRest\\V1\\Rest\\Doctorant\\DoctorantHydrator' => [ - 'entity_class' => \FirstRest\V1\Entity\Db\Doctorant::class, - 'object_manager' => 'doctrine.entitymanager.orm_default', - 'by_value' => true, - 'strategies' => [], - 'use_generated_hydrator' => true, - ], - ], - 'zf-content-validation' => [ - 'FirstRest\\V1\\Rest\\Doctorant\\Controller' => [ - 'input_filter' => 'FirstRest\\V1\\Rest\\Doctorant\\Validator', - ], - ], - 'input_filter_specs' => [ - 'FirstRest\\V1\\Rest\\Doctorant\\Validator' => [ - 0 => [ - 'name' => 'civilite', - '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' => 5, - ], - ], - ], - ], - 1 => [ - 'name' => 'dateNaissance', - 'required' => true, - 'filters' => [], - 'validators' => [], - ], - 2 => [ - 'name' => 'nationalite', - 'required' => false, - 'filters' => [ - 0 => [ - 'name' => \Zend\Filter\StringTrim::class, - ], - 1 => [ - 'name' => \Zend\Filter\StripTags::class, - ], - ], - 'validators' => [], - ], - 3 => [ - 'name' => 'email', - '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' => 255, - ], - ], - ], - ], - 4 => [ - 'name' => 'nomPatronymique', - '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' => 60, - ], - ], - ], - ], - 5 => [ - 'name' => 'nomUsuel', - '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' => 60, - ], - ], - ], - ], - 6 => [ - 'name' => 'prenom', - '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' => 60, - ], - ], - ], - ], - 7 => [ - 'name' => 'prenoms', - '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' => 100, - ], - ], - ], - ], - 8 => [ - 'name' => 'tel', - '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' => 20, - ], - ], - ], - ], - 9 => [ - 'name' => 'sourceCode', - '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' => 100, - ], - ], - ], - ], - 10 => [ - 'name' => 'histoCreation', - 'required' => true, - 'filters' => [], - 'validators' => [], - ], - 11 => [ - 'name' => 'histoDestruction', - 'required' => false, - 'filters' => [], - 'validators' => [], - ], - 12 => [ - 'name' => 'histoModification', - 'required' => true, - 'filters' => [], - 'validators' => [], - ], - ], - ], -]; diff --git a/module/FirstRest/src/V1/Entity/Db/Doctorant.php b/module/FirstRest/src/V1/Entity/Db/Doctorant.php deleted file mode 100644 index 5aa52a4..0000000 --- a/module/FirstRest/src/V1/Entity/Db/Doctorant.php +++ /dev/null @@ -1,400 +0,0 @@ -<?php - -namespace FirstRest\V1\Entity\Db; - -use Doctrine\Common\Collections\ArrayCollection; -use Doctrine\Common\Collections\Collection; - -/** - * Doctorant - */ -class Doctorant -{ - - /** - * @var integer - */ - protected $id; - - /** - * @var string - */ - protected $civilite; - - /** - * @var string - */ - protected $nationalite; - - /** - * @var \DateTime - */ - protected $dateNaissance; - - /** - * @var string - */ - protected $email; - - /** - * @var string - */ - protected $nomPatronymique; - - /** - * @var string - */ - protected $nomUsuel; - - /** - * @var string - */ - protected $prenom; - - /** - * @var string - */ - protected $prenoms; - - /** - * @var string - */ - protected $sourceCode; - - /** - * @var string - */ - protected $tel; - - /** - * @var Collection - */ - private $complements; - - protected $histoCreation; - protected $histoDestruction; - protected $histoModification; - - /** - * Constructor - */ - public function __construct() - { - $this->complements = new ArrayCollection(); - } - - /** - * Set dateNaissance - * - * @param \DateTime $dateNaissance - * - * @return self - */ - public function setDateNaissance($dateNaissance) - { - $this->dateNaissance = $dateNaissance; - - return $this; - } - - /** - * Get dateNaissance - * - * @return \DateTime - */ - public function getDateNaissance() - { - return $this->dateNaissance; - } - - /** - * @return string - */ - public function getNationalite() - { - return $this->nationalite; - } - - /** - * @param string $nationalite - * @return Doctorant - */ - public function setNationalite($nationalite) - { - $this->nationalite = $nationalite; - - return $this; - } - - /** - * Set email - * - * @param string $email - * - * @return self - */ - public function setEmail($email) - { - $this->email = $email; - - return $this; - } - - /** - * Get email - * - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * Set nomPatronymique - * - * @param string $nomPatronymique - * - * @return self - */ - public function setNomPatronymique($nomPatronymique) - { - $this->nomPatronymique = $nomPatronymique; - - return $this; - } - - /** - * Get nomPatronymique - * - * @return string - */ - public function getNomPatronymique() - { - return $this->nomPatronymique; - } - - /** - * Set nomUsuel - * - * @param string $nomUsuel - * - * @return self - */ - public function setNomUsuel($nomUsuel) - { - $this->nomUsuel = $nomUsuel; - - return $this; - } - - /** - * Get nomUsuel - * - * @return string - */ - public function getNomUsuel() - { - return $this->nomUsuel; - } - - /** - * Set prenom - * - * @param string $prenom - * - * @return self - */ - public function setPrenom($prenom) - { - $this->prenom = $prenom; - - return $this; - } - - /** - * Get prenom - * - * @param bool $tous - * @return string - */ - public function getPrenom($tous = false) - { - return $tous ? $this->prenoms : $this->prenom; - } - - /** - * Get prenoms - * - * @return string - */ - public function getPrenoms() - { - return $this->prenoms; - } - - /** - * Set prenoms - * - * @param string $prenoms - * - * @return self - */ - public function setPrenoms($prenoms) - { - $this->prenoms = $prenoms; - - return $this; - } - - /** - * Set sourceCode - * - * @param string $sourceCode - * - * @return self - */ - public function setSourceCode($sourceCode) - { - $this->sourceCode = $sourceCode; - - return $this; - } - - /** - * Get sourceCode - * - * @return string - */ - public function getSourceCode() - { - return $this->sourceCode; - } - - /** - * Set tel - * - * @param string $tel - * - * @return self - */ - public function setTel($tel) - { - $this->tel = $tel; - - return $this; - } - - /** - * Get tel - * - * @return string - */ - public function getTel() - { - return $this->tel; - } - - /** - * Get id - * - * @return integer - */ - public function getId() - { - return $this->id; - } - - /** - * Set civilite - * - * @param string $civilite - * - * @return self - */ - public function setCivilite($civilite) - { - $this->civilite = $civilite; - - return $this; - } - - /** - * Get civilite - * - * @return string - */ - public function getCivilite() - { - return $this->civilite; - } - - /** - * Get civilite - * - * @return string - */ - public function getCiviliteToString() - { - return $this->getCivilite(); - } - - /** - * Get estUneFemme - * - * @return bool - */ - public function estUneFemme() - { - return 'Mme' === $this->getCivilite(); - } - - /** - * @return mixed - */ - public function getHistoCreation() - { - return $this->histoCreation; - } - - /** - * @param mixed $histoCreation - */ - public function setHistoCreation($histoCreation) - { - $this->histoCreation = $histoCreation; - } - - /** - * @return mixed - */ - public function getHistoDestruction() - { - return $this->histoDestruction; - } - - /** - * @param mixed $histoDestruction - */ - public function setHistoDestruction($histoDestruction) - { - $this->histoDestruction = $histoDestruction; - } - - /** - * @return mixed - */ - public function getHistoModification() - { - return $this->histoModification; - } - - /** - * @param mixed $histoModification - */ - public function setHistoModification($histoModification) - { - $this->histoModification = $histoModification; - } - -} diff --git a/module/FirstRest/src/V1/Entity/Db/Mapping/FirstRest.V1.Entity.Db.Doctorant.dcm.xml b/module/FirstRest/src/V1/Entity/Db/Mapping/FirstRest.V1.Entity.Db.Doctorant.dcm.xml deleted file mode 100644 index 5244c95..0000000 --- a/module/FirstRest/src/V1/Entity/Db/Mapping/FirstRest.V1.Entity.Db.Doctorant.dcm.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?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="FirstRest\V1\Entity\Db\Doctorant" table="THESARD"> - <id name="id" type="integer" column="ID"> - <generator strategy="SEQUENCE"/> - </id> - - <field name="civilite" type="string" column="CIVILITE" length="5" nullable="false"/> - <field name="dateNaissance" type="datetime" column="DATE_NAISSANCE" nullable="false"/> - <field name="nationalite" type="string" column="NATIONALITE" nullable="true"/> - <field name="email" type="string" column="EMAIL" length="255" nullable="true"/> - <field name="nomPatronymique" type="string" column="NOM_PATRONYMIQUE" length="60" nullable="false"/> - <field name="nomUsuel" type="string" column="NOM_USUEL" length="60" nullable="false"/> - <field name="prenom" type="string" column="PRENOM" length="60" nullable="false"/> - <field name="prenoms" type="string" column="PRENOMS" length="100" nullable="false"/> - <field name="tel" type="string" column="TEL" length="20" nullable="true"/> - <field name="sourceCode" type="string" column="SOURCE_CODE" length="100" nullable="true"/> - - <field name="histoCreation" type="datetime" column="HISTO_CREATION" nullable="false"/> - <field name="histoDestruction" type="datetime" column="HISTO_DESTRUCTION" nullable="true"/> - <field name="histoModification" type="datetime" column="HISTO_MODIFICATION" nullable="false"/> - - </entity> -</doctrine-mapping> diff --git a/module/FirstRest/src/V1/Rest/Doctorant/DoctorantCollection.php b/module/FirstRest/src/V1/Rest/Doctorant/DoctorantCollection.php deleted file mode 100644 index 74a5075..0000000 --- a/module/FirstRest/src/V1/Rest/Doctorant/DoctorantCollection.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Doctorant; - -use Zend\Paginator\Paginator; - -class DoctorantCollection extends Paginator -{ -} diff --git a/module/FirstRest/src/V1/Rest/Doctorant/DoctorantResource.php b/module/FirstRest/src/V1/Rest/Doctorant/DoctorantResource.php deleted file mode 100644 index b0b8e43..0000000 --- a/module/FirstRest/src/V1/Rest/Doctorant/DoctorantResource.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Doctorant; - -use ZF\Apigility\Doctrine\Server\Resource\DoctrineResource; - -class DoctorantResource extends DoctrineResource -{ -} diff --git a/module/FirstRest/src/V1/Rest/Ping/PingCollection.php b/module/FirstRest/src/V1/Rest/Ping/PingCollection.php deleted file mode 100644 index fb8cdf3..0000000 --- a/module/FirstRest/src/V1/Rest/Ping/PingCollection.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Ping; - -use Zend\Paginator\Paginator; - -class PingCollection extends Paginator -{ -} diff --git a/module/FirstRest/src/V1/Rest/Ping/PingEntity.php b/module/FirstRest/src/V1/Rest/Ping/PingEntity.php deleted file mode 100644 index 3ef9dd9..0000000 --- a/module/FirstRest/src/V1/Rest/Ping/PingEntity.php +++ /dev/null @@ -1,60 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Ping; - -class PingEntity -{ - protected $id; - protected $value; - - /** - * PingEntity constructor. - * - * @param $id - * @param $value - */ - public function __construct($id, $value) - { - $this->id = $id; - $this->value = $value; - } - - /** - * @return mixed - */ - public function getId() - { - return $this->id; - } - - /** - * @param mixed $id - * @return PingEntity - */ - public function setId($id) - { - $this->id = $id; - - return $this; - } - - /** - * @return mixed - */ - public function getValue() - { - return $this->value; - } - - /** - * @param mixed $value - * @return PingEntity - */ - public function setValue($value) - { - $this->value = $value; - - return $this; - } - - -} diff --git a/module/FirstRest/src/V1/Rest/Ping/PingResource.php b/module/FirstRest/src/V1/Rest/Ping/PingResource.php deleted file mode 100644 index 760a3c0..0000000 --- a/module/FirstRest/src/V1/Rest/Ping/PingResource.php +++ /dev/null @@ -1,113 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Ping; - -use Zend\Paginator\Adapter\ArrayAdapter; -use ZF\ApiProblem\ApiProblem; -use ZF\Rest\AbstractResourceListener; - -class PingResource extends AbstractResourceListener -{ - /** - * Create a resource - * - * @param mixed $data - * @return ApiProblem|mixed - */ - public function create($data) - { - return new ApiProblem(405, 'The POST method has not been defined'); - } - - /** - * Delete a resource - * - * @param mixed $id - * @return ApiProblem|mixed - */ - public function delete($id) - { - return new ApiProblem(405, 'The DELETE method has not been defined for individual resources'); - } - - /** - * Delete a collection, or members of a collection - * - * @param mixed $data - * @return ApiProblem|mixed - */ - public function deleteList($data) - { - return new ApiProblem(405, 'The DELETE method has not been defined for collections'); - } - - /** - * Fetch a resource - * - * @param mixed $id - * @return ApiProblem|mixed - */ - public function fetch($id) - { - return new PingEntity(1, 1234); - } - - /** - * Fetch all or a subset of resources - * - * @param array $params - * @return ApiProblem|mixed - */ - public function fetchAll($params = []) - { - return new PingCollection(new ArrayAdapter([ - new PingEntity(1, 1234), - new PingEntity(2, 5678), - ])); - } - - /** - * Patch (partial in-place update) a resource - * - * @param mixed $id - * @param mixed $data - * @return ApiProblem|mixed - */ - public function patch($id, $data) - { - return new ApiProblem(405, 'The PATCH method has not been defined for individual resources'); - } - - /** - * Patch (partial in-place update) a collection or members of a collection - * - * @param mixed $data - * @return ApiProblem|mixed - */ - public function patchList($data) - { - return new ApiProblem(405, 'The PATCH method has not been defined for collections'); - } - - /** - * Replace a collection or members of a collection - * - * @param mixed $data - * @return ApiProblem|mixed - */ - public function replaceList($data) - { - return new ApiProblem(405, 'The PUT method has not been defined for collections'); - } - - /** - * Update a resource - * - * @param mixed $id - * @param mixed $data - * @return ApiProblem|mixed - */ - public function update($id, $data) - { - return new ApiProblem(405, 'The PUT method has not been defined for individual resources'); - } -} diff --git a/module/FirstRest/src/V1/Rest/Ping/PingResourceFactory.php b/module/FirstRest/src/V1/Rest/Ping/PingResourceFactory.php deleted file mode 100644 index 4d545e8..0000000 --- a/module/FirstRest/src/V1/Rest/Ping/PingResourceFactory.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php -namespace FirstRest\V1\Rest\Ping; - -class PingResourceFactory -{ - public function __invoke($services) - { - return new PingResource(); - } -} diff --git a/module/ImportData/src/V1/Entity/Db/Mapping/ImportData.V1.Entity.Db.These.dcm.xml b/module/ImportData/src/V1/Entity/Db/Mapping/ImportData.V1.Entity.Db.These.dcm.xml new file mode 100644 index 0000000..9f3c34e --- /dev/null +++ b/module/ImportData/src/V1/Entity/Db/Mapping/ImportData.V1.Entity.Db.These.dcm.xml @@ -0,0 +1,25 @@ +<?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\These" table="APOGEE.OBJECTH_THESE"> + <id name="id" type="integer" column="ID"/> + <field name="individuId" type="integer" column="INDIVIDU_ID" nullable="true"/> + <field name="title" type="string" column="LIB_THS" length="800" nullable="true"/> + <field name="etatThese" type="string" column="ETA_THS" length="1" nullable="true"/> + <field name="uniteRechId" type="string" column="COD_EQR" length="10" nullable="true"/> + <field name="ecoleDoctId" type="string" column="COD_NAT_EDO" length="4" nullable="true"/> + <field name="libDiscipline" type="integer" column="COD_DIS" nullable="true"/> + <field name="libEtabCotut" type="string" column="LIB_ETB_COT" length="120" nullable="true"/> + <field name="libPaysCotut" type="string" column="LIB_PAY" length="40" nullable="true"/> + <field name="datePremiereInsc" type="datetime" column="DAT_DEB_THS" nullable="true"/> + <field name="dateSoutenanceAutorisee" type="datetime" column="DAT_AUT_SOU_THS" nullable="true"/> + <field name="dateSoutenancePrev" type="datetime" column="DAT_PREV_SOU" nullable="true"/> + <field name="dateSoutenance" type="datetime" column="DAT_SOU_THS" nullable="true"/> + <field name="dateConfidFin" type="datetime" column="DAT_FIN_CFD_THS" nullable="true"/> + <field name="resultat" type="string" column="COD_NEG_TRE" length="1" nullable="true"/> + <field name="correctionAutorisee" type="string" column="CORRECTION_POSSIBLE" length="1" nullable="true"/> + <!--<field name="source_code" type="integer" column="ID" nullable="true"/>–>--> + +</entity> +</doctrine-mapping> diff --git a/module/ImportData/src/V1/Entity/Db/These.php b/module/ImportData/src/V1/Entity/Db/These.php new file mode 100644 index 0000000..4cfe3cf --- /dev/null +++ b/module/ImportData/src/V1/Entity/Db/These.php @@ -0,0 +1,302 @@ +<?php + +namespace ImportData\V1\Entity\Db; + + +/** + * Doctorant + */ +class These +{ + + /** + * @var integer + */ + protected $id; + protected $title; + protected $individuId; + protected $etatThese; + protected $uniteRechId; + protected $ecoleDoctId; + protected $libDiscipline; + protected $libEtabCotut; + protected $libPaysCotut; + protected $datePremiereInsc; + protected $dateSoutenanceAutorisee; + protected $dateSoutenancePrev; + protected $dateSoutenance; + protected $dateConfidFin; + protected $resultat; + protected $correctionAutorisee; + protected $sourceCode; + + + /** + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * @return mixed + */ + public function getTitle() + { + return $this->title; + } + + /** + * @param mixed $title + */ + public function setTitle($title) + { + $this->title = $title; + } + + /** + * @return mixed + */ + public function getIndividuId() + { + return $this->individuId; + } + + /** + * @param mixed $individuId + */ + public function setIndividuId($individuId) + { + $this->individuId = $individuId; + } + + /** + * @return mixed + */ + public function getEtatThese() + { + return $this->etatThese; + } + + /** + * @param mixed $etatThese + */ + public function setEtatThese($etatThese) + { + $this->etatThese = $etatThese; + } + + /** + * @return mixed + */ + public function getUniteRechId() + { + return $this->uniteRechId; + } + + /** + * @param mixed $uniteRechId + */ + public function setUniteRechId($uniteRechId) + { + $this->uniteRechId = $uniteRechId; + } + + /** + * @return mixed + */ + public function getEcoleDoctId() + { + return $this->ecoleDoctId; + } + + /** + * @param mixed $ecoleDoctId + */ + public function setEcoleDoctId($ecoleDoctId) + { + $this->ecoleDoctId = $ecoleDoctId; + } + + /** + * @return mixed + */ + public function getLibDiscipline() + { + return $this->libDiscipline; + } + + /** + * @param mixed $libDiscipline + */ + public function setLibDiscipline($libDiscipline) + { + $this->libDiscipline = $libDiscipline; + } + + /** + * @return mixed + */ + public function getLibEtabCotut() + { + return $this->libEtabCotut; + } + + /** + * @param mixed $libEtabCotut + */ + public function setLibEtabCotut($libEtabCotut) + { + $this->libEtabCotut = $libEtabCotut; + } + + /** + * @return mixed + */ + public function getLibPaysCotut() + { + return $this->libPaysCotut; + } + + /** + * @param mixed $libPaysCotut + */ + public function setLibPaysCotut($libPaysCotut) + { + $this->libPaysCotut = $libPaysCotut; + } + + /** + * @return mixed + */ + public function getDatePremiereInsc() + { + return $this->datePremiereInsc; + } + + /** + * @param mixed $datePremiereInsc + */ + public function setDatePremiereInsc($datePremiereInsc) + { + $this->datePremiereInsc = $datePremiereInsc; + } + + + + /** + * @return mixed + */ + public function getDateSoutenanceAutorisee() + { + return $this->dateSoutenanceAutorisee; + } + + /** + * @param mixed $dateSoutenanceAutorisee + */ + public function setDateSoutenanceAutorisee($dateSoutenanceAutorisee) + { + $this->dateSoutenanceAutorisee = $dateSoutenanceAutorisee; + } + + /** + * @return mixed + */ + public function getDateSoutenancePrev() + { + return $this->dateSoutenancePrev; + } + + /** + * @param mixed $dateSoutenancePrev + */ + public function setDateSoutenancePrev($dateSoutenancePrev) + { + $this->dateSoutenancePrev = $dateSoutenancePrev; + } + + /** + * @return mixed + */ + public function getDateSoutenance() + { + return $this->dateSoutenance; + } + + /** + * @param mixed $dateSoutenance + */ + public function setDateSoutenance($dateSoutenance) + { + $this->dateSoutenance = $dateSoutenance; + } + + /** + * @return mixed + */ + public function getDateConfidFin() + { + return $this->dateConfidFin; + } + + /** + * @param mixed $dateConfidFin + */ + public function setDateConfidFin($dateConfidFin) + { + $this->dateConfidFin = $dateConfidFin; + } + + /** + * @return mixed + */ + public function getResultat() + { + return $this->resultat; + } + + /** + * @param mixed $resultat + */ + public function setResultat($resultat) + { + $this->resultat = $resultat; + } + + /** + * @return mixed + */ + public function getCorrectionAutorisee() + { + return $this->correctionAutorisee; + } + + /** + * @param mixed $correctionAutorisee + */ + public function setCorrectionAutorisee($correctionAutorisee) + { + $this->correctionAutorisee = $correctionAutorisee; + } + + /** + * @return mixed + */ + public function getSourceCode() + { + return $this->sourceCode; + } + + /** + * @param mixed $sourceCode + */ + public function setSourceCode($sourceCode) + { + $this->sourceCode = $sourceCode; + } + + + +} -- GitLab