59,18 → 59,31 |
return $this->collectionBlocksfils; |
} |
|
function afficherPattern($chemin, $fonction) |
function afficherPattern($chemin,$nom_fonction) |
{ |
if ($chemin == $this->identifiant) { |
/*echo "identifiant: $this->identifiant</br>"; |
echo "chemin: $chemin</br>"; |
echo "nom_fonction: $nom_fonction</br>";*/ |
|
} else { |
if($chemin==$this->identifiant) |
{ |
call_user_func($nom_fonction,$this->donnees); |
} |
else |
{ |
|
$etape_chemin = explode('>', $chemin); |
if($chemin == $etape_chemin[0]) { |
for ($i = 0; $i < count($this->collectionBlocksfils); $i++) { |
if($this->identifiant==$etape_chemin[0]) |
{ //echo "collection</br>"; |
for($i=0;$i<count($this->collectionBlocksfils);$i++) |
{ |
$collection = $this->collectionBlocksfils[$i]; |
if ($collection->recupererIdentifiant() == $etape_chemin[1]) { |
//echo "collection2</br>"; |
if ($collection->recupererIdentifiant()==$etape_chemin[1]) |
{ |
echo "collection3</br>"; |
array_shift($etape_chemin); |
afficherPattern(implode('>', $etape_chemin), $fonction); |
$collection->afficherPattern(implode('>',$etape_chemin),$nom_fonction); |
} |
} |
} |