c2e0b12e |
<?php
namespace MVC\Classe;
class ModularRegister{
public $registry = array();
public $index = array();
public function __construct(){
|
71ac33a8 |
$fichier = file(MODULES_PATH . DIRECTORY_SEPARATOR . "setup" . DIRECTORY_SEPARATOR ."registre.model");
|
c2e0b12e |
foreach ($fichier as $ligne_num => $ligne) {
|
71ac33a8 |
if (preg_match("#([ ]*[a-zA-Z0-9-_+éèàùïîç]*)[ ]*[:][ ]*([0-9a-zA-Z-_+ 'éèàùïîç.]*[ ]*)#", $ligne, $matches)) {
|
c2e0b12e |
$this->registry[$matches[1]] = $matches[2];
$this->index[] = $matches[1];
}
}
}
public function getRegistre(){
|
71ac33a8 |
return $this->registry;
|
c2e0b12e |
}
public function getIndex(){
|
71ac33a8 |
return $this->index;
|
c2e0b12e |
}
}
|