... | ... |
@@ -9,9 +9,10 @@ class ModularRegister{ |
9 | 9 |
|
10 | 10 |
public function __construct(){ |
11 | 11 |
|
12 |
- $fichier = file(MODULES_PATH.DIRECTORY_SEPARATOR."setup" . DIRECTORY_SEPARATOR ."registre.model"); |
|
12 |
+ $fichier = file(MODULES_PATH . DIRECTORY_SEPARATOR . "setup" . DIRECTORY_SEPARATOR ."registre.model"); |
|
13 | 13 |
foreach ($fichier as $ligne_num => $ligne) { |
14 |
- if (preg_match("#[ ]*([a-zA-Z-_+]*)[ ]*[:][ ]*([0-9a-zA-Z-_+ ']*[ ]*)#", $ligne, $matches)) { |
|
14 |
+ if (preg_match("#([ ]*[a-zA-Z0-9-_+éèàùïîç]*)[ ]*[:][ ]*([0-9a-zA-Z-_+ 'éèàùïîç.]*[ ]*)#", $ligne, $matches)) { |
|
15 |
+ |
|
15 | 16 |
$this->registry[$matches[1]] = $matches[2]; |
16 | 17 |
$this->index[] = $matches[1]; |
17 | 18 |
} |
... | ... |
@@ -19,10 +20,10 @@ class ModularRegister{ |
19 | 20 |
} |
20 | 21 |
|
21 | 22 |
public function getRegistre(){ |
22 |
- return $this->index; |
|
23 |
+ return $this->registry; |
|
23 | 24 |
} |
24 | 25 |
|
25 | 26 |
public function getIndex(){ |
26 |
- return $this->registry; |
|
27 |
+ return $this->index; |
|
27 | 28 |
} |
28 | 29 |
} |
29 | 30 |
\ No newline at end of file |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,28 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace MVC\Classe; |
|
4 |
+ |
|
5 |
+class ModularRegister{ |
|
6 |
+ |
|
7 |
+ public $registry = array(); |
|
8 |
+ public $index = array(); |
|
9 |
+ |
|
10 |
+ public function __construct(){ |
|
11 |
+ |
|
12 |
+ $fichier = file(MODULES_PATH.DIRECTORY_SEPARATOR."setup" . DIRECTORY_SEPARATOR ."registre.model"); |
|
13 |
+ foreach ($fichier as $ligne_num => $ligne) { |
|
14 |
+ if (preg_match("#[ ]*([a-zA-Z-_+]*)[ ]*[:][ ]*([0-9a-zA-Z-_+ ']*[ ]*)#", $ligne, $matches)) { |
|
15 |
+ $this->registry[$matches[1]] = $matches[2]; |
|
16 |
+ $this->index[] = $matches[1]; |
|
17 |
+ } |
|
18 |
+ } |
|
19 |
+ } |
|
20 |
+ |
|
21 |
+ public function getRegistre(){ |
|
22 |
+ return $this->index; |
|
23 |
+ } |
|
24 |
+ |
|
25 |
+ public function getIndex(){ |
|
26 |
+ return $this->registry; |
|
27 |
+ } |
|
28 |
+} |
|
0 | 29 |
\ No newline at end of file |