Subversion Repositories eFlore/Applications.coel

Rev

Rev 1541 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1541 Rev 1829
Line 1... Line 1...
1
<?php
1
<?php
2
/**
2
/**
3
 * Classe permettant de traiter plus facilement les champs dénomarlisés de la base de données COEL.
3
 * Classe permettant de traiter plus facilement les champs dégueulasses de la base de données COEL.
4
 * 
4
 * 
5
 * @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
5
 * @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
6
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
6
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
7
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
7
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
8
 * @version $Id$
8
 * @version $Id$
Line 270... Line 270...
270
	public static function extraireNbrePart($truk_unite_base) {
270
	public static function extraireNbrePart($truk_unite_base) {
271
		$types = explode(self::SEPARATEUR_VALEURS, $truk_unite_base);
271
		$types = explode(self::SEPARATEUR_VALEURS, $truk_unite_base);
272
		$nbre = 0;
272
		$nbre = 0;
273
		foreach ($types as $type) {
273
		foreach ($types as $type) {
274
			$unite_base = explode(self::SEPARATEUR_TYPE_VALEUR, $type);
274
			$unite_base = explode(self::SEPARATEUR_TYPE_VALEUR, $type);
-
 
275
			$nbre_part = 0;
-
 
276
			if (isset($unite_base[1])) {
275
			$unite_base_info = explode('||', $unite_base[1]);
277
				$unite_base_info = explode('||', $unite_base[1]);
276
			$nbre_part = $unite_base_info[3];
278
				$nbre_part = $unite_base_info[3];
-
 
279
			}
277
			$nbre += $nbre_part;
280
			$nbre += $nbre_part;
278
		}
281
		}
279
		return $nbre;
282
		return $nbre;
280
	}
283
	}
281
}
284
}
282
285