14,25 → 14,25 |
* @version $Id$ |
*/ |
class FicheMetadonnees extends aControleur { |
|
private $projet = ''; |
|
private $projet = ''; |
private $serviceMetaDonnees; |
|
|
public function __construct($metadonnees = null) { |
$this->capturerParametres(); |
$this->serviceMetaDonnees = (is_null($this->serviceMetaDonnees)) ? new MetaDonnees($this->projet) : $metadonnees; |
} |
|
|
public function executerActionParDefaut() { |
$this->executerAffichageMetaDonnees(); |
} |
|
|
public function chargerMetadonneesHtml() { |
$donnees['metadonnees'] = $this->serviceMetaDonnees->getMetaDonnees(); |
$html = $this->getVue(dirname(__FILE__).'/squelettes/metadonnees', $donnees); |
return $html; |
} |
|
|
public function executerAffichageMetaDonnees($donnees) { |
header('Content-type: text/html'); |
$html = $this->chargerMetadonneesHtml(); |
39,26 → 39,11 |
echo $html; |
exit; |
} |
|
|
private function capturerParametres() { |
if (isset($_GET['projet'])) { |
$this->projet = $_GET['projet']; |
} |
} |
|
protected function recupererTableauConfig($param) { |
$tableau = array(); |
$tableauPartiel = explode(',', Config::get($param)); |
$tableauPartiel = array_map('trim', $tableauPartiel); |
foreach ($tableauPartiel as $champ) { |
if (strpos($champ, '=') === false) { |
$tableau[] = $champ; |
} else { |
list($cle, $val) = explode('=', $champ); |
$tableau[$cle] = $val; |
} |
} |
return $tableau; |
} |
} |
?> |