Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 27 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
36 jpm 1
<?php
27 jpm 2
 
3
class collectionblockdedonnees{
4
 
5
    protected $identifiant;
6
    protected $collection;
7
    protected $erreur;
8
 
9
   function __construct($identifiant)
10
   {
11
       $this->identifiant = $identifiant;
12
       $this->collection = array();
13
   }
14
 
15
   function affecterIdentifiant($identifiant)
16
    {
17
        $this->identifiant = $identifiant;
18
    }
19
 
20
    function ajouterDonnees($donnees)
21
    {
22
        $block = new blockdedonnees($this->identifiant);
23
        $block->affecterDonnees($donnees);
24
        $this->affecterBlockDeDonnees($block);
25
 
26
    }
27
 
28
    function affecterBlockDeDonnees($blockdonnees)
29
    {
30
        array_push($this->collection,$blockdonnees);
31
    }
32
 
33
    function recupererBlocksDeDonnees()
34
    {
35
        return $this->collection;
36
    }
37
 
38
    function recupererIdentifiant()
39
    {
36 jpm 40
        return $this->identifiant;
27 jpm 41
    }
42
 
43
    function recupererErreur()
44
    {
45
        return $this->erreur;
46
    }
47
 
48
 
49
    function afficher()
50
    {
51
        echo "<LI><B>$this->identifiant</B></LI>";
52
        for($i=0;$i<count($this->collection);$i++)
53
        {
54
            $uneCollection =$this->collection[$i];
55
            $uneCollection->afficher();
56
 
57
        }
58
    }
59
 
60
}
61
 
62
?>