18,6 → 18,11 |
{ |
$this->identifiant = $identifiant; |
} |
|
function recupererIdentifiant() |
{ |
return $this->identifiant; |
} |
|
function affecterDonnees($donnees) |
{ |
59,36 → 64,26 |
return $this->collectionBlocksfils; |
} |
|
function afficherPattern($chemin,$nom_fonction) |
{ |
/*echo "identifiant: $this->identifiant</br>"; |
echo "chemin: $chemin</br>"; |
echo "nom_fonction: $nom_fonction</br>";*/ |
|
if($chemin==$this->identifiant) |
{ |
call_user_func($nom_fonction,$this->donnees); |
} |
else |
{ |
|
$etape_chemin = explode('>',$chemin); |
if($this->identifiant==$etape_chemin[0]) |
{ //echo "collection</br>"; |
for($i=0;$i<count($this->collectionBlocksfils);$i++) |
{ |
$collection =$this->collectionBlocksfils[$i]; |
//echo "collection2</br>"; |
if ($collection->recupererIdentifiant()==$etape_chemin[1]) |
{ |
echo "collection3</br>"; |
array_shift($etape_chemin); |
$collection->afficherPattern(implode('>',$etape_chemin),$nom_fonction); |
} |
} |
} |
} |
} |
function afficherPattern($chemin, $nom_fonction) |
{ |
$retour = ''; |
if($chemin == $this->recupererIdentifiant()) { |
$retour .= call_user_func($nom_fonction, $this->recupererDonnees()); |
} else { |
$etape_chemin = explode('>', $chemin); |
if($this->identifiant == $etape_chemin[0]) { |
$collection_block_fils = $this->recupererCollectionBlockFils(); |
for($i = 0; $i < count($collection_block_fils); $i++) { |
$collection = $collection_block_fils[$i]; |
if ($collection->recupererIdentifiant() == $etape_chemin[1]) { |
array_shift($etape_chemin); |
$retour .= $collection->afficherPattern(implode('>', $etape_chemin), $nom_fonction); |
} |
} |
} |
} |
return $retour; |
} |
|
function afficher() |
{ |