1,25 → 1,26 |
<?php |
// Encodage : UTF-8 |
// +-------------------------------------------------------------------------------------------------------------------+ |
// declare(encoding='UTF-8'); |
/** |
* Découpage des noms latins |
* Classe de découpage des noms latins. |
* |
* Description : classe permettant de découper les noms latins. |
* |
//Auteur original : |
* @internal Mininum PHP version : 5.2 |
* @category CEL |
* @package Services |
* @subpackage Bibliothèques |
* @version 0.1 |
* @author Mathias CHOUET <mathias@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright Tela-Botanica 1999-2009 |
* @licence GPL v3 & CeCILL v2 |
* @version $Id: DecoupageNomLatin.class.php 1873 2009-03-31 10:07:24Z Jean-Pascal MILCENT $ |
* @author Aurelien PERONNET <aurelien@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
// +-------------------------------------------------------------------------------------------------------------------+ |
class DecoupageNomLatin extends Decoupage { |
|
private $expression_principale = array(); |
private $expression_complement = array(); |
|
function DecoupageNomLatin() |
{ |
public function __construct() { |
parent::__construct(); |
|
// Genre et nom supragénérique |
40,8 → 41,7 |
|
} |
|
public function decouper($nom_latin) |
{ |
public function decouper($nom_latin) { |
$aso_nom_decompo = array( 'nom_genre' => '', 'nom_sp' => '', 'auteur_sp' => '', 'nom_complement' => '', |
'type_infrasp' => '', 'nom_infrasp' => '', |
'num_nomenc' => '', 'num_taxo' => '', 'rang_taxonomique' => '', |
135,9 → 135,7 |
return $aso_nom_decompo; |
} |
|
public function verifierTerminaisonLatine($nom_latin) |
{ |
|
public function verifierTerminaisonLatine($nom_latin) { |
if (preg_match('/^Plantae$/', $nom_latin)) {// Règne |
return 10; |
} else if (preg_match('/phyta$/', $nom_latin)) {// Embranchement ou Division |
167,8 → 165,7 |
} |
} |
|
static function fournirTableauAbreviationRang($type = 'tout') |
{ |
static function fournirTableauAbreviationRang($type = 'tout') { |
$rang_supra_sp = array('subgen.', 'subg.', 'sect.');// l'abréviation du rang est suivi par un nom supra spécifique commençant par une majuscule |
$rang_supra_gr = array('gr.');// l'abréviation du rang est suivi par un nom ne commençant pas par une majuscule |
$rang_supra_agg = array('agg.');// le nom latin est terminé par l'abréviation du rang |
193,8 → 190,7 |
} |
} |
|
static function actualiserCodeRang($code_rang) |
{ |
static function actualiserCodeRang($code_rang) { |
$aso_rang = array( '1' => '10', // Règne |
'3' => '20', // Sous-Règne |
'5' => '30', // Phylum |
250,10 → 246,8 |
return $aso_rang[$code_rang]; |
} |
|
public function attribuerCodeInfra($str_abreviation_type_infra) |
{ |
public function attribuerCodeInfra($str_abreviation_type_infra) { |
$aso_code_infra = array('type' => '', 'code' => 0, 'rang' => 2 ); |
|
switch ($str_abreviation_type_infra) { |
case 'subgen.' : |
case 'subg.' : |
365,14 → 359,11 |
$aso_code_infra['erreur_notes'] = $str_abreviation_type_infra; |
$aso_code_infra['rang'] = 2; |
} |
|
return $aso_code_infra; |
} |
|
public function attribuerCodeRang($str_abreviation_type_infra) |
{ |
public function attribuerCodeRang($str_abreviation_type_infra) { |
$aso_code_infra = $this->attribuerCodeInfra($str_abreviation_type_infra); |
return $aso_code_infra['rang']; |
} |
} |
?> |
} |