Skip to content

Commit 862bd5b

Browse files
committed
Updated README.md
1 parent 936cc7c commit 862bd5b

File tree

2 files changed

+83
-34
lines changed

2 files changed

+83
-34
lines changed

LICENSE.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
New BSD License
2+
3+
Copyright (c) 2011-2016, Phalcon Framework Team
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of the Phalcon nor the
14+
names of its contributors may be used to endorse or promote products
15+
derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL PHALCON FRAMEWORK TEAM BE LIABLE FOR ANY
21+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README.md

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
Phalcon MVC examples
2-
====================
1+
# Phalcon MVC Examples
32

4-
These are examples of MVC file structures you can employ using Phalcon >= 2.0.x
3+
These are examples of [MVC][mvc-pattern] file structures you can employ using Phalcon >= 3.0.x
54

65
For further documentation, check out the [Phalcon Docs](https://docs.phalconphp.com/).
76

87
## Simple
9-
This is a very simple MVC structure, it contains one model, two controllers and a view.
10-
This example does not implement namespaces. Services are defined in public/index.php
11-
without using Di\\FactoryDefault:
8+
9+
This is a very simple [MVC][mvc-pattern] structure, it contains one model, two controllers and a view.
10+
This example does not implement namespaces. Services are defined in `public/index.php`
11+
without using `Di\FactoryDefault`:
1212

1313
```
1414
simple
@@ -26,9 +26,10 @@ simple
2626
```
2727

2828
## Simple-Volt
29-
This is a very simple MVC structure, it contains one model, two controllers and a view.
30-
This example does not implement namespaces. Services are defined in public/index.php
31-
without using Di\\FactoryDefault. This example uses Volt as template engine:
29+
30+
This is a very simple [MVC][mvc-pattern] structure, it contains one model, two controllers and a view.
31+
This example does not implement namespaces. Services are defined in `public/index.php`
32+
without using `Di\FactoryDefault`. This example uses Volt as template engine:
3233

3334
```
3435
simple-volt/
@@ -53,9 +54,10 @@ simple-volt/
5354
```
5455

5556
## Simple-Subcontrollers
56-
Another very simple MVC structure, it contains one model, three controllers and a view.
57-
Routes are defined in app/config/routes.php. Some routes point to controllers in a
58-
subdirectory of controllers/:
57+
58+
Another very simple [MVC][mvc-pattern] structure, it contains one model, three controllers and a view.
59+
Routes are defined in `app/config/routes.php`. Some routes point to controllers in a
60+
subdirectory of `controllers/`:
5961

6062
```
6163
simple-subcontrollers/
@@ -86,10 +88,11 @@ simple-subcontrollers/
8688
```
8789

8890
## Simple-Without-Application
89-
Simple MVC structure without employing Phalcon\\Mvc\\Application.
91+
92+
Simple [MVC][mvc-pattern] structure without employing `Phalcon\Mvc\Application`.
9093
This application does not use namespaces. This is an example of
91-
how you can override Phalcon\\Mvc\\Application by implementing a similar functionality.
92-
It also defines services without using Di\\FactoryDefault in public/index.php:
94+
how you can override `Phalcon\Mvc\Application` by implementing a similar functionality.
95+
It also defines services without using `Di\FactoryDefault` in `public/index.php`:
9396

9497
```
9598
simple-without-application/
@@ -107,9 +110,10 @@ simple-without-application/
107110
```
108111

109112
## Single
110-
This a single-module MVC structure without namespaces. You can find the module's directories
111-
under the apps/ directory. This example does not use namespaces. All services are
112-
initialized in public/index.php. Also, in this file, you can also find an application
113+
114+
This a single-module [MVC][mvc-pattern] structure without namespaces. You can find the module's directories
115+
under the `apps/` directory. This example does not use namespaces. All services are
116+
initialized in `public/index.php`. Also, in this file, you can also find an application
113117
class that initializes services and autoloaders grouping these tasks by methods.
114118

115119
```
@@ -130,9 +134,10 @@ single
130134
```
131135

132136
## Single-Namespaces
133-
This a single-module MVC structure using namespaces. You can find the module's directories
134-
under the apps/ directory. This example does not use namespaces. All services are
135-
initialized in public/index.php. Also, in this file, you can also find an application
137+
138+
This a single-module [MVC][mvc-pattern] structure using namespaces. You can find the module's directories
139+
under the `apps/` directory. This example does not use namespaces. All services are
140+
initialized in `public/index.php`. Also, in this file, you can also find an application
136141
class that initializes services and autoloaders grouping these tasks by methods.
137142

138143
```
@@ -151,8 +156,9 @@ single-namespaces/
151156
```
152157

153158
## Single-Factory-Default
154-
A single-module MVC structure as is generated by Phalcon-Devtools.
155-
Instead of initialize every service individually, it uses Di\\FactoryDefault:
159+
160+
A single-module [MVC][mvc-pattern] structure as is generated by [Phalcon Developer Tools][devtools].
161+
Instead of initialize every service individually, it uses `Di\FactoryDefault`:
156162

157163
```
158164
single-factory-default/
@@ -173,7 +179,8 @@ single-factory-default/
173179
```
174180

175181
## Single-Camelized-Dirs
176-
This a single-module MVC structure. All files and directories are camelized (including views):
182+
183+
This a single-module [MVC][mvc-pattern] structure. All files and directories are camelized (including views):
177184

178185
```
179186
single-camelized-dirs/
@@ -196,9 +203,10 @@ single-camelized-dirs/
196203
```
197204

198205
## Multiple
199-
This a multi-module MVC structure. This example implements two modules: frontend and backend.
206+
207+
This a multi-module [MVC][mvc-pattern] structure. This example implements two modules: frontend and backend.
200208
By default frontend is served if no route to backend is asked. You can define which routes
201-
use one module or another in public/index.php:
209+
use one module or another in `public/index.php`:
202210

203211
```
204212
multiple/
@@ -232,9 +240,10 @@ multiple/
232240
```
233241

234242
## Multiple-Volt
235-
This a multi-module MVC structure. This example implements two modules: frontend and backend.
243+
244+
This a multi-module [MVC][mvc-pattern] structure. This example implements two modules: frontend and backend.
236245
By default frontend is served if no route to backend is asked. You can define which routes
237-
use one module or another in public/index.php. Volt is used as template engine:
246+
use one module or another in `public/index.php`. Volt is used as template engine:
238247

239248
```
240249
multiple-volt/
@@ -259,7 +268,8 @@ multiple-volt/
259268
```
260269

261270
## Multiple-Shared-Views
262-
This a multi-module MVC structure with a common views directory:
271+
272+
This a multi-module [MVC][mvc-pattern] structure with a common views directory:
263273

264274
```
265275
multiple-shared-views/
@@ -288,7 +298,8 @@ multiple-shared-views/
288298
```
289299

290300
## Multiple-Factory-Default
291-
This a multi-module MVC structure as is generated by Phalcon-Devtools:
301+
302+
This a multi-module [MVC][mvc-pattern] structure as is generated by [Phalcon Developer Tools][devtools]:
292303

293304
```
294305
multiple-factory-default/
@@ -311,7 +322,8 @@ multiple-factory-default/
311322

312323

313324
## Multiple-Service-Layer-Model
314-
This a multi-module MVC structure with model service layer pattern implemented:
325+
326+
This a multi-module [MVC][mvc-pattern] structure with model service layer pattern implemented:
315327

316328
```
317329
multiple-service-layer-model/
@@ -358,6 +370,7 @@ multiple-service-layer-model/
358370
```
359371

360372
## Micro
373+
361374
A micro-framework-like application:
362375

363376
```
@@ -366,7 +379,8 @@ micro
366379
```
367380

368381
## Micro-Factory-Default
369-
A micro-framework-like application as is generated by Phalcon-Devtools:
382+
383+
A micro-framework-like application as is generated by [Phalcon Developer Tools][devtools]:
370384

371385
```
372386
micro-factory-default/
@@ -381,8 +395,8 @@ micro-factory-default/
381395
```
382396

383397
## Micro-Simple-Views
384-
A micro-framework-like application where views are rendered using
385-
Phalcon\Mvc\View\Simple:
398+
399+
A micro-framework-like application where views are rendered using `Phalcon\Mvc\View\Simple`:
386400

387401
```
388402
micro-simple-views
@@ -395,3 +409,12 @@ micro-simple-views
395409
├── 500.volt
396410
└── index.volt
397411
```
412+
413+
## License
414+
415+
Phalcon MVC Examples is open source software licensed under the New BSD License.
416+
See the LICENSE.txt file for more. <br>
417+
Copyright (c) 2011-2016, Phalcon Framework Team
418+
419+
[devtools]: https://github.com/phalcon/phalcon-devtools
420+
[mvc-pattern]: https://en.wikipedia.org/wiki/Model–view–controller

0 commit comments

Comments
 (0)