Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

Rev 36 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36 Rev 38
Line 4... Line 4...
4
    
4
    
5
    protected $identifiant;
5
    protected $identifiant;
6
    protected $collection;
6
    protected $collection;
Line 7... Line 7...
7
    protected $erreur;
7
    protected $erreur;
8
    
8
    
9
   function __construct($identifiant)
9
    function __construct($identifiant)
10
   {
10
    {
11
       $this->identifiant = $identifiant;
11
        $this->identifiant = $identifiant;
Line 12... Line 12...
12
       $this->collection = array();
12
        $this->collection = array();
13
   }
13
    }
14
   
14
   
15
   function affecterIdentifiant($identifiant) 
15
   function affecterIdentifiant($identifiant) 
Line 16... Line 16...
16
    { 
16
    {
17
        $this->identifiant = $identifiant;
17
        $this->identifiant = $identifiant;
18
    }
18
    }
19
    
19
    
20
    function ajouterDonnees($donnees)
20
    function ajouterDonnees($donnees)
21
    {
-
 
22
        $block = new blockdedonnees($this->identifiant);
21
    {
23
        $block->affecterDonnees($donnees);
22
        $block = new blockdedonnees($this->identifiant);
24
        $this->affecterBlockDeDonnees($block);
23
        $block->affecterDonnees($donnees);
25
        
24
        $this->affecterBlockDeDonnees($block);
26
    }
25
    }
27
   
26
    
Line 28... Line 27...
28
    function affecterBlockDeDonnees($blockdonnees) 
27
    function affecterBlockDeDonnees($blockdonnees) 
29
    { 
28
    {
Line 42... Line 41...
42
    
41
    
43
    function recupererErreur()
42
    function recupererErreur()
44
    {
43
    {
45
        return $this->erreur;
44
        return $this->erreur;
46
    }
-
 
Line 47... Line 45...
47
 
45
    }
48
    
46
    
49
    function afficher()
47
    function afficher()
50
    {
48
    {
51
        echo "<LI><B>$this->identifiant</B></LI>";
-
 
52
        for($i=0;$i<count($this->collection);$i++)
49
        echo '<li><b>'.$this->identifiant.'</b></li>';
53
        {
50
        for($i = 0; $i < count($this->collection); $i++) {
54
            $uneCollection =$this->collection[$i];
-
 
55
            $uneCollection->afficher();
51
            $uneCollection = $this->collection[$i];
56
            
52
            $uneCollection->afficher();
57
        }
-
 
58
    }
53
        }
59
 
-
 
60
}
54
    }
61
 
55
}