Subversion Repositories eFlore/Archives.eflore-consultation-v2

Compare Revisions

Ignore whitespace Rev 38 → Rev 42

/trunk/serveur/bibliotheque/classes/eflore_collection_block_de_donnees.class.php
1,56 → 1,66
<?php
 
class collectionblockdedonnees{
protected $identifiant;
protected $collection;
protected $erreur;
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->collection = array();
}
function affecterIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
}
function ajouterDonnees($donnees)
{
$block = new blockdedonnees($this->identifiant);
$block->affecterDonnees($donnees);
$this->affecterBlockDeDonnees($block);
}
function affecterBlockDeDonnees($blockdonnees)
{
array_push($this->collection,$blockdonnees);
}
function recupererBlocksDeDonnees()
{
return $this->collection;
}
function recupererIdentifiant()
{
return $this->identifiant;
}
function recupererErreur()
{
return $this->erreur;
}
function afficher()
{
echo '<li><b>'.$this->identifiant.'</b></li>';
for($i = 0; $i < count($this->collection); $i++) {
$uneCollection = $this->collection[$i];
$uneCollection->afficher();
}
}
}
<?php
 
class collectionblockdedonnees{
protected $identifiant;
protected $collection;
protected $erreur;
function __construct($identifiant)
{
$this->identifiant = $identifiant;
$this->collection = array();
}
function affecterIdentifiant($identifiant)
{
$this->identifiant = $identifiant;
}
function ajouterDonnees($donnees)
{
$block = new blockdedonnees($this->identifiant);
$block->affecterDonnees($donnees);
$this->affecterBlockDeDonnees($block);
}
function affecterBlockDeDonnees($blockdonnees)
{
array_push($this->collection,$blockdonnees);
}
function recupererBlocksDeDonnees()
{
return $this->collection;
}
function recupererIdentifiant()
{
return $this->identifiant;
}
function recupererErreur()
{
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 afficher()
{
echo '<li><b>'.$this->identifiant.'</b></li>';
for($i = 0; $i < count($this->collection); $i++) {
$uneCollection = $this->collection[$i];
$uneCollection->afficher();
}
}
}
?>