Rev 36 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
<?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();
}
}
}
?>