Skip to content

Commit

Permalink
:: corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheron committed Oct 18, 2017
1 parent ce273a3 commit caab099
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/controller/controllers.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Ubiquity Controllers
====================
A controller is a PHP class inheriting from `micro\controllers\Controller`, providing an entry point in the application.
A controller is a PHP class inheriting from ``micro\\controllers\\Controller``, providing an entry point in the application.
Controllers and their methods define accessible URLs.

Controller creation
Expand All @@ -12,7 +12,7 @@ To create the Products controller, use the command:
::
Micro controller Products

The Products.php controller is created in the `app/controllers` folder of the project.
The Products.php controller is created in the ``app/controllers`` folder of the project.

::
<?php
Expand All @@ -26,13 +26,14 @@ The Products.php controller is created in the `app/controllers` folder of the pr
}

It is now possible to access URLs (the `index` method is solicited by default):
It is now possible to access URLs (the ``index`` method is solicited by default):
::
example.com/Products
example.com/Products/index

.. note:: A controller can be created manually. In this case, he must respect the following rules:
* The class must be in the `app/controllers` folder

* The class must be in the ``app/controllers`` folder
* The name of the class must match the name of the php file
* It must inherit from `ControllerBase` and be defined in the namespace `controllers`
* It must override the abstract `index` method
* It must inherit from ``ControllerBase`` and be defined in the namespace ``controllers``
* It must override the abstract ``index`` method

0 comments on commit caab099

Please sign in to comment.