- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
$fileContent=file_get_contents($this->rootPath.'app/'.$this->interface.$this->handler.$this->p_h.'.php');
if (preg_match('/class\s{1,}\b'.$this->handler.$this->p_h.'\b/i', $fileContent,$matches)) {
.............
if (preg_match('/function\s{1,}\b'.$this->action.$this->p_a.'\b/i', $fileContent,$matches)) {
$class=$this->handler.$this->p_h;
$action=$this->action.$this->p_a;
$this->includeClass($class,$action);
return;
.............
по стилю напоминает 3158 и 3160
похоже автор пытался доказать что при помощи регулярных выражений можно сделать все
Так оно и есть
Не. Все таки их можно оставить.