Skip to content

Commit 7ac85bf

Browse files
committed
Cleaned the readme and authors list.
1 parent 75f0256 commit 7ac85bf

File tree

2 files changed

+13
-135
lines changed

2 files changed

+13
-135
lines changed

AUTHORS

+7-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
Cédric Bonhomme
44
Jérôme Lombardi
55
Juan Rocha
6+
Ruslan Baidan
67

78

89
# Contributors
@@ -19,10 +20,12 @@ Thomas Metois
1920

2021
# Copyright holders
2122

22-
- Copyright (C) 2016-2019 Jérôme Lombardi - https://github.com/jerolomb
23-
- Copyright (C) 2016-2019 Juan Rocha - https://github.com/jfrocha
24-
- Copyright (C) 2016-2019 SMILE gie securitymadein.lu
25-
- Copyright (C) 2017-2019 Cédric Bonhomme - https://github.com/cedricbonhomme
23+
- Copyright (C) 2022-2024 Luxembourg House of Cybersecurity https://lhc.lu
24+
- Copyright (C) 2016-2022 SMILE gie securitymadein.lu
25+
- Copyright (C) 2016-2024 Jérôme Lombardi - https://github.com/jerolomb
26+
- Copyright (C) 2016-2024 Juan Rocha - https://github.com/jfrocha
27+
- Copyright (C) 2017-2024 Cédric Bonhomme - https://www.cedricbonhomme.org
28+
- Copyright (C) 2019-2024 Ruslan Baidan - https://github.com/ruslanbaidan
2629
- Copyright (C) 2016-2017 Guillaume Lesniak
2730
- Copyright (C) 2016-2017 Thomas Metois
2831
- Copyright (C) 2016-2017 Jérôme De Almeida

README.md

+6-131
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,18 @@
11
MONARC Core project
22
===================
33

4-
See example repository for create:
5-
6-
* Entity
7-
* Table
8-
* Service
9-
* Controller
10-
* and configure Module.php & module.config.php
11-
12-
Entity
13-
------
14-
15-
Create Entity file & class in Model/Entity folder and extend it whith `AbstractEntity`.
16-
17-
Define `protected` attributes and use [DoctrineOrm][1] for define table & columns.
18-
19-
In `Module.php:getServiceConfig()` add in `invokables`:
20-
21-
'\Monarc\Core\Model\Entity\MyEntity' => '\Monarc\Core\Model\Entity\MyEntity',
22-
23-
For generating migrating file & migrate DB avec adding/deleting/changing column:
24-
25-
php ./vendor/bin/doctrine-module migrations:diff
26-
php ./vendor/bin/doctrine-module migrations:migrate
27-
28-
29-
Entity Table
30-
------------
31-
32-
Create EntityTable file & class in Model/Table folder and extend it whith `AbstractEntityTable`.
33-
34-
Define your own functions fo loading entities datas from database.
35-
AbstractEntityTable has already functions:
36-
37-
* getDb: return DB object
38-
* fetchAll: return all data for entity
39-
* get: return entity
40-
* save
41-
* delete
42-
43-
In `Module.php:getServiceConfig()` add in `factories`:
44-
45-
'\Monarc\Core\Model\Table\MyEntityTable' => function($sm){
46-
return new Model\Table\MyEntityTable($sm->get('\Monarc\Core\Model\Db'));
47-
},
48-
49-
50-
Controller
51-
----------
52-
53-
Create Controller file & class in Controller folder and extend it with `AbstractController`.
54-
55-
Adding function:
56-
57-
* getList()
58-
* get($id)
59-
* create($data)
60-
* update($id, $data)
61-
* delete($id)
62-
63-
In `module.config.php`, define route & controller:
64-
65-
'controller' => '\Monarc\Core\Controller\MyIndex',
66-
67-
68-
Controller Factory
69-
------------------
70-
71-
Create Controller Factory file & class in Controller folder and extend it with `AbstractControllerFactory`.
72-
73-
Define `protected $serviceName = '\Monarc\Core\Service\MyService';`.
74-
75-
In `Module.php:getControllerConfig()` add in `factories`:
76-
77-
'\Monarc\Core\Controller\MyIndex' => '\Monarc\Core\Controller\MyIndexControllerFactory',
78-
79-
80-
Service
81-
-------
82-
83-
Create Service file & class in Service folder and extend it with `AbstractService`.
84-
85-
Define attributes ressources used in this service:
86-
87-
protected $ressource1;
88-
protected $ressource2;
89-
90-
And business functions.
91-
92-
For accessing ressource:
93-
94-
$this->get('ressource1');
95-
96-
Or
97-
98-
$this->getServiceFactory();
99-
100-
101-
Service Factory
102-
---------------
103-
104-
Create Service file & class in Service Factory folder and extend it with `AbstractServiceFactory`.
105-
106-
Define ressources to load in Service:
107-
108-
protected $ressources = array(
109-
'ressource1'=> '\Monarc\Core\Model\Table\EntityTable',
110-
'ressource2'=> '\Monarc\Core\Model\Entity\Entity',
111-
);
112-
113-
Or
114-
115-
protected $ressources = '\Monarc\Core\Model\Table\EntityTable';
116-
117-
In `Module.php:getServiceConfig()` add in `factories`:
118-
119-
'\Monarc\Core\Service\MyIndexService' => '\Monarc\Core\Service\MyIndexServiceFactory',
120-
121-
122-
1234
License
1245
-------
1256

1267
This software is licensed under
1278
[GNU Affero General Public License version 3](http://www.gnu.org/licenses/agpl-3.0.html)
1289

129-
- Copyright (C) 2016-2018 Jérôme Lombardi - https://github.com/jerolomb
130-
- Copyright (C) 2016-2018 Juan Rocha - https://github.com/jfrocha
131-
- Copyright (C) 2016-2018 SMILE gie securitymadein.lu
132-
- Copyright (C) 2017-2018 Cédric Bonhomme - https://github.com/cedricbonhomme
10+
- Copyright (C) 2022-2024 Luxembourg House of Cybersecurity https://lhc.lu
11+
- Copyright (C) 2016-2022 SMILE gie securitymadein.lu
12+
- Copyright (C) 2016-2024 Jérôme Lombardi - https://github.com/jerolomb
13+
- Copyright (C) 2016-2024 Juan Rocha - https://github.com/jfrocha
14+
- Copyright (C) 2017-2024 Cédric Bonhomme - https://www.cedricbonhomme.org
15+
- Copyright (C) 2019-2024 Ruslan Baidan - https://github.com/ruslanbaidan
13316
- Copyright (C) 2016-2017 Guillaume Lesniak
13417
- Copyright (C) 2016-2017 Thomas Metois
13518
- Copyright (C) 2016-2017 Jérôme De Almeida
@@ -140,11 +23,3 @@ Disclaimer: This program is distributed in the hope that it will be useful, but
14023
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14124
FITNESS FOR A PARTICULAR PURPOSE.
14225
See the GNU Affero General Public License for more details.
143-
144-
145-
146-
[^1]: https://stevenwilliamalexander.wordpress.com/2013/09/25/zf2-restful-api-example/
147-
[^2]: https://www.youtube.com/watch?v=CGEDNMzWoFk
148-
[^3]: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html
149-
150-
[1]: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/basic-mapping.html

0 commit comments

Comments
 (0)