Subversion Repositories Applications.framework

Rev

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

Rev 120 Rev 224
Line 1... Line 1...
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe registre, qui permet un accès à différentes variables à travers les autres classes.
4
 * Classe registre, qui permet un accès à différentes variables à travers les autres classes.
5
 * C'est un singleton
5
 * C'est un singleton.
-
 
6
 *
-
 
7
 * @category	php 5.2
-
 
8
 * @package	Framework
-
 
9
 * @author		Jean-Pascal Milcent <jmp@tela-botanica.org>
-
 
10
 * @copyright	2009 Tela-Botanica
-
 
11
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
-
 
12
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
-
 
13
 * @version	SVN: $Id: Registre.php 224 2010-11-10 13:37:37Z jpm $
-
 
14
 * @link		/doc/framework/
6
 *
15
 *
7
* PHP Version 5
-
 
8
*
-
 
9
* @category  Class
-
 
10
* @package   Framework
-
 
11
* @author	Jean-Pascal Milcent <jmp@tela-botanica.org>
-
 
12
* @copyright 2009 Tela-Botanica
-
 
13
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
-
 
14
* @license   http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
-
 
15
* @version   SVN: $$Id: Registre.php 120 2009-09-01 12:21:14Z aurelien $$
-
 
16
* @link	  /doc/framework/
-
 
17
*
-
 
18
*/
16
*/
19
class Registre {
17
class Registre {
Line 20... Line -...
20
 
-
 
21
	/**
18
 
22
	 * Tableau associatif stockant les variables
-
 
23
	 */
19
	/** Tableau associatif stockant les variables */
24
	private $stockage = array();
20
	private $stockage = array();
25
	/**
21
	
26
	 * La classe registre se contient elle-même, (pour le pattern singleton)
-
 
27
	 */
22
	/** La classe registre se contient elle-même, (pour le pattern singleton) */
Line 28... Line -...
28
	private static $registre;
-
 
29
 
23
	private static $registre;
30
	/**
-
 
31
	 * Constructeur par défaut, privé, car on accède à la classe par le getInstance
24
 
32
	 */
-
 
Line 33... Line 25...
33
	private function __construct() {
25
	/** Constructeur par défaut, privé, car on accède à la classe par le getInstance */
34
	}
26
	private function __construct() {	}
35
 
27
 
36
	/**
28
	/**
Line 83... Line 75...
83
	/**
75
	/**
84
	 * Teste si un objet est présent sous un intitulé donné
76
	 * Teste si un objet est présent sous un intitulé donné
85
	 * @return boolean true si un objet associé à cet intitulé est présent, false sinon
77
	 * @return boolean true si un objet associé à cet intitulé est présent, false sinon
86
	 */
78
	 */
87
	public function existe($intitule) {
79
	public function existe($intitule) {
88
		if(isset($this->stockage[$intitule])){
80
		if (isset($this->stockage[$intitule])){
89
			return true;
81
			return true;
90
		}
82
		}
91
		return false;
83
		return false;
92
	}
84
	}
93
}
85
}