Subversion Repositories eFlore/Archives.eflore-consultation-v2

Rev

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

Rev Author Line No. Line
43 fred 1
<?php
2
global $gBlock;
3
 
4
	function pattern1($donnees)
5
	{
6
		echo "<H1>Liste des noms</H1>";
7
		echo "radical: $donnees['radical']</br>";
8
		echo '</br>';
9
	}
10
 
11
	function pattern2($donnees)
12
	{
13
		echo "<li>Nom:$donnees['intitule.eni_intitule_nom']</li>";
14
	}
15
 
16
class liste_nom_latin_xhtml implements iVue {
17
 
18
    protected $leBlock;
19
 
20
    function __construct($unBlock)
21
    {
22
        $this->leBlock = $unBlock;
23
    }
24
 
25
    function serialiser2()
26
    {
27
    	echo '<h2>Test</h3>';
28
    	$this->leBlock->afficherPattern('FICHE_LISTE_NOMS','pattern1');
29
    	echo '<OL>';
30
		$this->leBlock->afficherPattern('FICHE_LISTE_NOMS>NOM_SELECTION','pattern2');
31
    	echo '</OL>';
32
 
33
    }
34
 
35
    function serialiser()
36
    {
41 jpm 37
        $gBlock = $this->leBlock;
38
        $retour = '';
39
        $retour .= '<h3>'.'Test'.'</h3>';
40
        $retour .= '<ol>';
41
        $donnees = $this->leBlock->recupererDonnees();
42
        foreach ($donnees as $cle => $valeur) {
43
            $retour .= '<li>'.$cle.' : '.$valeur;
44
        }
45
        $retour .= '</ol>';
46
 
47
        $block_fils = $this->leBlock->recupererCollectionBlockFils();
48
        for($i = 0; $i < count($block_fils); $i++) {
49
            $collection = $block_fils[$i];
50
            $blocks = $collection->recupererBlocksDeDonnees();
51
            foreach ($blocks as $cle => $valeur) {
52
                $donnees = $valeur->recupererDonnees();
53
                $retour .= '<ol>';
54
                foreach ($donnees as $cle1 => $valeur1) {
55
                    $retour .= '<li>'.$cle1.' : '.$valeur1;
56
                }
57
                $retour .= '</ol>';
58
            }
59
        }
60
 
61
        echo $retour;
43 fred 62
    }
63
}
41 jpm 64
?>