summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
Diffstat (limited to 'src/model')
-rw-r--r--src/model/Menu.php2
-rw-r--r--src/model/Path.php5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/model/Menu.php b/src/model/Menu.php
index 10cf3d5..9fb8562 100644
--- a/src/model/Menu.php
+++ b/src/model/Menu.php
@@ -1,5 +1,5 @@
1<?php 1<?php
2// src/controller/Menu.php 2// src/model/Menu.php
3 3
4declare(strict_types=1); 4declare(strict_types=1);
5 5
diff --git a/src/model/Path.php b/src/model/Path.php
index 11be6fe..ad44fd9 100644
--- a/src/model/Path.php
+++ b/src/model/Path.php
@@ -1,5 +1,7 @@
1<?php 1<?php
2// src/controller/Path.php 2// src/model/Path.php
3//
4// attention, cette classe dépend de src/model/Menu.php
3 5
4declare(strict_types=1); 6declare(strict_types=1);
5 7
@@ -14,6 +16,7 @@ class Path extends Page
14 { 16 {
15 $path_array = explode('/', CURRENT_PAGE); 17 $path_array = explode('/', CURRENT_PAGE);
16 try{ 18 try{
19 // parcourir le menu de haut en bas pour obtenir un ou plusieurs objets Page
17 $this->findPage(Director::$menu_data, $path_array); // remplit $this->current_page 20 $this->findPage(Director::$menu_data, $path_array); // remplit $this->current_page
18 } 21 }
19 catch(Exception $e){} 22 catch(Exception $e){}