chapter == 'all'){ return true; } //documentation files must have the pattern /^swagger\-([a-zA-Z]+)\.json$/ $files = scandir(path::real(dirname(__FILE__).'/../documentation/')); foreach($files as $file){ if($file == 'swagger-'.$this->chapter.'.json'){ return true; } } return false; } public function __construct($args){ global $core; if($args == "documentation"){ //il faut concaténer toutes les docs disponibles $this->chapter = 'all'; }else{ list($osef,$this->chapter) = explode("/",$args); } if(!$this->chapterExists()){ $this->response_code = 404; $this->response_message = array( 'error' => 'Not found'.$this->chapter, 'code' => 404 ); } //le documentation demandée par l'user existe. $this->response_code = 200; $this->response_message = '