Routes
-
Des routes ? Là où on va, on n’a pas besoin de routes.
Le framework ne propose pas par défaut de gestionnaire de routes. Cette fonctionnalité peut-être créée et ajoutée sous forme de plugin, le mécanisme standard normalise les routes des fonctionnalités en fonction :- du nom de la classe métier auxquelles elles s’appliquent, au singulier ou au pluriel en fonction d’actions sur un objet ou sur un ensemble d’objets,
- l’identifiant de l’objet concerné le cas échéant,
- du nom de la fonctionnalité.
/Author/Project/Module/Business_Class/add
: formulaire de création d’un objetBusiness_Class
,/Author/Project/Module/Business_Class/1
: affichage d’un objetBusiness_Class
, identifiant 1 en base de données,/Author/Project/Module/Business_Class/1/output
: la même fonctionnalité d’affichage, explicitement précisée cette fois,/Author/Project/Module/Business_Classes
: la liste des objetsBusiness_Class
,/Author/Project/Module/Business_Classes/dataList
: la liste des objetsBusiness_Class
, explicitement demandée,/Author/Project/Module/Business_Class/1/write : l'écriture d'un formulaire (passé en paramètres
$_POST@ ) pour une propriété de notre objetBusiness_Class
d’identifiant 1 en base de données,- etc. (liste non exhaustive).
Chaque fonctionnalité supporte les paramètres supplémentaires dont elle a besoin.
En partant de cette convention de routage, le framework va rechercher automatiquement et successivement, en suivant la hiérarchie de la classe métier :- le classe contrôleur,
- la classe de vue,
- le template de vue.
Vous pouvez afficher la succession des classes et fichiers templates recherchés, du plus spécialisé au moins spécialisé, en ajoutant le paramètre de débogage à l’URI d’appel. Par exemple :
http://it.rocks/examples/ITRocks/Framework/Users?D&as_widget
Vous affichera l’arbre complet de recherches successives : le framework vous affiche les contrôleurs, vues, puis les templates recherchés, jusqu’à ce qu’ils soient trouvés, ou qu’on soit arrivé au composant le plus générique fourni par le framework.Cet exemple, sans surcharge du contrôleur, de la vue ou du template, vous donnera un arbre de recherche complet partant de la classe User, des traits utilisés, dans votre application (ici application Example), les applications parents.
Exemple de recherche de classe contrôleur
Pour la classe User du framework :- try A1 itrocks/examples/user/Data_List_Controller.php
- try A2 itrocks/examples/user/data_list/Data_List_Controller.php
- try A3 itrocks/examples/user/data_list/Controller.php
- try A4 itrocks/examples/User_Data_List_Controller.php
- try A5 itrocks/examples/user/Controller.php
- try A1 itrocks/examples/user/account/Data_List_Controller.php
- try A2 itrocks/examples/user/account/data_list/Data_List_Controller.php
- try A3 itrocks/examples/user/account/data_list/Controller.php
- try A4 itrocks/examples/user/Account_Data_List_Controller.php
- try A5 itrocks/examples/user/account/Controller.php
- try A1 itrocks/examples/traits/has_email/Data_List_Controller.php
- try A2 itrocks/examples/traits/has_email/data_list/Data_List_Controller.php
- try A3 itrocks/examples/traits/has_email/data_list/Controller.php
- try A4 itrocks/examples/traits/Has_Email_Data_List_Controller.php
- try A5 itrocks/examples/traits/has_email/Controller.php
- try A1 itrocks/examples/tools/current/Data_List_Controller.php
- try A2 itrocks/examples/tools/current/data_list/Data_List_Controller.php
- try A3 itrocks/examples/tools/current/data_list/Controller.php
- try A4 itrocks/examples/tools/Current_Data_List_Controller.php
- try A5 itrocks/examples/tools/current/Controller.php
- try A1 itrocks/framework/user/Data_List_Controller.php
- try A2 itrocks/framework/user/data_list/Data_List_Controller.php
- try A3 itrocks/framework/user/data_list/Controller.php
- try A4 itrocks/framework/User_Data_List_Controller.php
- try A5 itrocks/framework/user/Controller.php
- try A1 itrocks/framework/user/account/Data_List_Controller.php
- try A2 itrocks/framework/user/account/data_list/Data_List_Controller.php
- try A3 itrocks/framework/user/account/data_list/Controller.php
- try A4 itrocks/framework/user/Account_Data_List_Controller.php
- try A5 itrocks/framework/user/account/Controller.php
- try A1 itrocks/framework/traits/has_email/Data_List_Controller.php
- try A2 itrocks/framework/traits/has_email/data_list/Data_List_Controller.php
- try A3 itrocks/framework/traits/has_email/data_list/Controller.php
- try A4 itrocks/framework/traits/Has_Email_Data_List_Controller.php
- try A5 itrocks/framework/traits/has_email/Controller.php
- try A1 itrocks/framework/tools/current/Data_List_Controller.php
- try A2 itrocks/framework/tools/current/data_list/Data_List_Controller.php
- try A3 itrocks/framework/tools/current/data_list/Controller.php
- try A4 itrocks/framework/tools/Current_Data_List_Controller.php
- try A5 itrocks/framework/tools/current/Controller.php
- try B1 itrocks/framework/data_list/Controller.php
- try B2 itrocks/framework/data_list/Data_List_Controller.php
- try B3 itrocks/framework/widget/data_list/Controller.php
- try B4 itrocks/framework/widget/data_list/Data_List_Controller.php
- FOUND ITRocks\Framework\Widget\Data_List\Data_List_Controller::run
Exemple de recherche de classe vue
Pour la classe User du framework :- try A1 itrocks/examples/user/Data_List_Html_View.php
- try A2 itrocks/examples/user/data_list/Data_List_Html_View.php
- try A3 itrocks/examples/user/data_list/Html_View.php
- try A4 itrocks/examples/User_Data_List_Html_View.php
- try A5 itrocks/examples/user/Html_View.php
- try A1 itrocks/examples/user/account/Data_List_Html_View.php
- try A2 itrocks/examples/user/account/data_list/Data_List_Html_View.php
- try A3 itrocks/examples/user/account/data_list/Html_View.php
- try A4 itrocks/examples/user/Account_Data_List_Html_View.php
- try A5 itrocks/examples/user/account/Html_View.php
- try A1 itrocks/examples/traits/has_email/Data_List_Html_View.php
- try A2 itrocks/examples/traits/has_email/data_list/Data_List_Html_View.php
- try A3 itrocks/examples/traits/has_email/data_list/Html_View.php
- try A4 itrocks/examples/traits/Has_Email_Data_List_Html_View.php
- try A5 itrocks/examples/traits/has_email/Html_View.php
- try A1 itrocks/examples/tools/current/Data_List_Html_View.php
- try A2 itrocks/examples/tools/current/data_list/Data_List_Html_View.php
- try A3 itrocks/examples/tools/current/data_list/Html_View.php
- try A4 itrocks/examples/tools/Current_Data_List_Html_View.php
- try A5 itrocks/examples/tools/current/Html_View.php
- try A1 itrocks/framework/user/Data_List_Html_View.php
- try A2 itrocks/framework/user/data_list/Data_List_Html_View.php
- try A3 itrocks/framework/user/data_list/Html_View.php
- try A4 itrocks/framework/User_Data_List_Html_View.php
- try A5 itrocks/framework/user/Html_View.php
- try A1 itrocks/framework/user/account/Data_List_Html_View.php
- try A2 itrocks/framework/user/account/data_list/Data_List_Html_View.php
- try A3 itrocks/framework/user/account/data_list/Html_View.php
- try A4 itrocks/framework/user/Account_Data_List_Html_View.php
- try A5 itrocks/framework/user/account/Html_View.php
- try A1 itrocks/framework/traits/has_email/Data_List_Html_View.php
- try A2 itrocks/framework/traits/has_email/data_list/Data_List_Html_View.php
- try A3 itrocks/framework/traits/has_email/data_list/Html_View.php
- try A4 itrocks/framework/traits/Has_Email_Data_List_Html_View.php
- try A5 itrocks/framework/traits/has_email/Html_View.php
- try A1 itrocks/framework/tools/current/Data_List_Html_View.php
- try A2 itrocks/framework/tools/current/data_list/Data_List_Html_View.php
- try A3 itrocks/framework/tools/current/data_list/Html_View.php
- try A4 itrocks/framework/tools/Current_Data_List_Html_View.php
- try A5 itrocks/framework/tools/current/Html_View.php
- try B1 itrocks/framework/data_list/Html_View.php
- try B2 itrocks/framework/data_list/Data_List_Html_View.php
- try B3 itrocks/framework/widget/data_list/Html_View.php
- try B4 itrocks/framework/widget/data_list/Data_List_Html_View.php
- try B5 itrocks/framework/webservice/data_list/Html_View.php
- try B6 itrocks/framework/webservice/data_list/Data_List_Html_View.php
- try B1 itrocks/framework/data_list/Html_View.php
- try B2 itrocks/framework/data_list/Data_List_Html_View.php
- try B3 itrocks/framework/widget/data_list/Html_View.php
- try B4 itrocks/framework/widget/data_list/Data_List_Html_View.php
- try B5 itrocks/framework/webservice/data_list/Html_View.php
- try B6 itrocks/framework/webservice/data_list/Data_List_Html_View.php
- try C2 itrocks/framework/view/html/Default_View.php
- FOUND ITRocks\Framework\View\Html\Default_View::run
Exemple de recherche de template de vue
Pour la classe User du framework :- try A1 itrocks/examples/user/dataList.html
- try A2 itrocks/examples/user/data_list/dataList.html
- try A4 itrocks/examples/User_dataList.html
- try A1 itrocks/examples/user/account/dataList.html
- try A2 itrocks/examples/user/account/data_list/dataList.html
- try A4 itrocks/examples/user/Account_dataList.html
- try A1 itrocks/examples/traits/has_email/dataList.html
- try A2 itrocks/examples/traits/has_email/data_list/dataList.html
- try A4 itrocks/examples/traits/Has_Email_dataList.html
- try A1 itrocks/examples/tools/current/dataList.html
- try A2 itrocks/examples/tools/current/data_list/dataList.html
- try A4 itrocks/examples/tools/Current_dataList.html
- try A1 itrocks/framework/user/dataList.html
- try A2 itrocks/framework/user/data_list/dataList.html
- try A4 itrocks/framework/User_dataList.html
- try A1 itrocks/framework/user/account/dataList.html
- try A2 itrocks/framework/user/account/data_list/dataList.html
- try A4 itrocks/framework/user/Account_dataList.html
- try A1 itrocks/framework/traits/has_email/dataList.html
- try A2 itrocks/framework/traits/has_email/data_list/dataList.html
- try A4 itrocks/framework/traits/Has_Email_dataList.html
- try A1 itrocks/framework/tools/current/dataList.html
- try A2 itrocks/framework/tools/current/data_list/dataList.html
- try A4 itrocks/framework/tools/Current_dataList.html
- try B2 itrocks/framework/data_list/dataList.html
- try B4 itrocks/framework/widget/data_list/dataList.html
- FOUND ITRocks\Framework\Widget\Data_List\dataList::run
Voir aussi