Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 43 → Rev 44

/trunk/serveur/bibliotheque/classes/eflore_collection_block_de_donnees.class.php
44,22 → 44,22
return $this->erreur;
}
function afficherPattern($chemin,$nom_fonction)
{
//echo "boucle</br>";
for($i=0;$i<count($this->collection);$i++)
{
$blockdonnees =$this->collection[$i];
$blockdonnees->afficherPattern($chemin,$nom_fonction);
}
}
function afficherPattern($chemin, $nom_fonction)
{
$retour = '';
for($i = 0; $i < count($this->collection); $i++) {
$block_donnees = $this->collection[$i];
$retour .= $block_donnees->afficherPattern($chemin, $nom_fonction);
}
return $retour;
}
function afficher()
{
echo '<li><b>'.$this->identifiant.'</b></li>';
for($i = 0; $i < count($this->collection); $i++) {
$uneCollection = $this->collection[$i];
$uneCollection->afficher();
$une_collection = $this->collection[$i];
$une_collection->afficher();
}
}
}
/trunk/serveur/bibliotheque/classes/eflore_block_de_donnees.class.php
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()
{