2 require_once(dirname(__FILE__
)."/AccessorsManager.class.php");
4 class Menu
extends AccessorsManager
8 const CLASS_VERSION
= "20080407";
19 public function __construct($file)
21 $this->setFile($file);
22 $this->setMenu(parse_ini_file($file,true));
31 * Getters and Setters are automatically build by the AccessorsManager Class.
33 * You don't need to write them unless you want them to do specific things.
43 public function getClassVersion()
45 return self
::CLASS_VERSION
;
48 public function buildMenu($key="MAIN")
51 $menu = $this->getMenu();
53 if(array_key_exists($key,$menu))
59 trigger_error(__METHOD__
." : The given key (<i>".$key."</i>) does not exist !", E_USER_ERROR
);
65 public function getParentLink($key)
68 $menu = $this->getMenu();
83 trigger_error(__METHOD__
." : The given key (<i>".$key."</i>) does not exist !", E_USER_ERROR
);