Common Usage

Implementation

Pam is very easy to use & very light to implement !

Config

You must create a configuration folder which will contain the parameters files

You can name them as you want, both the folder & the parameters files

But the index file will have to call these parameters files.

Index

Don't forget to add autoload & sessions (if you need) to the file beginning...

Model

For the Model naming, you need to use the same name than each table...

You can choose, the Model path & the Model suffix, in the parameters.

For example (without any changes to the Model constants), if you have a table named Pizza, you should have a Model named PizzaModel.php

View

For the views, Pam use Twig, the Template Engine of Symfony

The only configuration to manage is the 2 View constants in the parameters files

One is for the View template path & the second for the View cache path...

For the Twig functions, filters & tags, please refer to the official documentation

Controller

For the Controller naming, you need to use the same name than each access value inside the URL of the website...

You can choose, the Controller path, the Controller default name & the Controller suffix in the parameters.

Same thing for the Contoller Method default name & the Controller Method suffix.

For example (without any changes to the Controller constants), if you watch the URL of this page, the access value is "start", so we have a controller named StartController.php