|
@@ -168,29 +168,13 @@ class Format{
|
|
|
|
|
|
$dirFiles = scandir($pathDirFormat);
|
|
|
if( $dirFiles !== false ){
|
|
|
- foreach( $dirFiles as $fileName ){
|
|
|
- if( preg_match('@([^.]+)\.php@U', $fileName, $out) ){ // Is PHP file ?
|
|
|
- $infos = array(); // Information about the bridge
|
|
|
- $resParse = token_get_all(file_get_contents($pathDirFormat . $fileName)); // Parse PHP file
|
|
|
- foreach($resParse as $v){
|
|
|
- if( is_array($v) && $v[0] == T_DOC_COMMENT ){ // Lexer node is COMMENT ?
|
|
|
- $commentary = $v[1];
|
|
|
- foreach( $searchCommonPattern as $name){ // Catch information with common pattern
|
|
|
- preg_match('#@' . preg_quote($name, '#') . '\s+(.+)#', $commentary, $outComment);
|
|
|
- if( isset($outComment[1]) ){
|
|
|
- $infos[$name] = $outComment[1];
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if( isset($infos['name']) ){ // If informations containt at least a name
|
|
|
- $listFormat[$out[1]] = $infos;
|
|
|
- }
|
|
|
- }
|
|
|
+ foreach( $dirFiles as $fileName ){
|
|
|
+ if( preg_match('@^([^.]+)\.php$@U', $fileName, $out) ){ // Is PHP file ?
|
|
|
+ $listFormat[] = $out[1];
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return $listFormat;
|
|
|
}
|
|
|
-}
|
|
|
+}
|