38 _root::getLog()->info(
'--layout: initialisation ['.$sLayout.
']');
39 if($sLayout==null){
throw new Exception(
'layout non definit dans le constructeur :(');}
46 public function __set($sVar, $sVal){
48 $this->_tVar[$sVar]=$sVal;
54 if(!array_key_exists($sVar,$this->_tVar)){
55 _root::getLog()->error(
'Variable '.$sVar.
' inexistante dans le layout '.$this->_sLayout);
56 throw new Exception(
'Variable '.$sVar.
' inexistante dans le layout '.$this->_sLayout);
58 return $this->_tVar[$sVar];
66 return isset($this->_tVar[$sVar]);
73 unset($this->_tVar[$sVar]);
83 $this->_sLayout=$sLayout;
92 public function add($sPlace,$oTpl){
93 _root::getLog()->info(
'-layout: ajout appel vue ['.$oTpl->getPath().
'] a la place ['.$sPlace.
']');
94 $this->_tContent[$sPlace][]=$oTpl;
103 _root::getLog()->info(
'-layout: ajout appel module ['.$sAppel.
'] a la place ['.$sPlace.
']');
104 list($sModule,$sAction)= preg_split(
'/::/',$sAppel);
105 $sModule=
'module_'.$sModule;
106 $oModule=
new $sModule;
107 $this->_tContent[$sPlace][]=call_user_func( array($oModule,
'_'.$sAction));
120 throw new Exception(implode(
"\n",$tErreur));
136 throw new Exception(implode(
"\n",$tErreur));
141 $sSortie=ob_get_contents();
154 _root::getLog()->info(
'-layout: chargement/affichage place ['.$sPlace.
']');
155 if(!isset($this->_tContent[$sPlace])){
return null;}
157 foreach($this->_tContent[$sPlace] as $oTpl){
158 $sLoad.=$oTpl->show();
static getConfigVar($sCatAndVar, $uDefaut=null)
addModule($sPlace, $sAppel)
__construct($sLayout=null)