You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,11 @@ This parameter accepts an array holding options.
83
83
-`exclude_substrings`: (array) sub-strings of paths to exclude from the list. e.g. `[ '.min', '_del', 'temp', 'library', 'vendor' ]`
84
84
-`is_recursive`: (boolean) whether to scan sub-directories.
85
85
-`ignore_note_file_names`: (array) ignore note file names that tell the parser to skip the directory. When one of the files exist in the parsing directory, the directory will be skipped. Default: `[ 'ignore-class-map.txt' ]`,
86
-
86
+
-`comment_header` : (array, optional) what header comment to insert at the top of the generated file
87
+
-`text` : (string, optional) the header comment to set
88
+
-`path` : (string, optional) the file path to extract the comment from
89
+
-`class` : (string, optional) the class name to use its doc-block as the header comment
90
+
-`type` : (string, optional) indicates what type of data to collect. Accepted values are `DOCBLOCK`, `CONSTANT`.
87
91
##### Example
88
92
89
93
##### Generating a class map in the script directory.
* @license MIT <http://opensource.org/licenses/MIT>
11
+
* @version 1.3.0
8
12
*/
9
13
10
14
namespacePHPClassMapGenerator;
@@ -16,8 +20,7 @@
16
20
*
17
21
* This is meant to be used for the callback function for the spl_autoload_register() function.
18
22
*
19
-
* @remark The parsed class file must have a name of the class defined in the file.
20
-
* @version 1.2.2
23
+
* @remark The parsed class file must have a name of the class defined in the file.
21
24
*/
22
25
class PHPClassMapGenerator implements interfacePHPClassMapGenerator {
23
26
@@ -126,7 +129,18 @@ public function __construct( $sBaseDirPath, $asScanDirPaths, $sOutputFilePath, a
126
129
'ignore_note_file_names' => ['ignore-class-map.txt'] // 1.1.0 When this option is present and the parsing directory contains a file matching one of the set names, the directory will be skipped.
127
130
],
128
131
129
-
);
132
+
// Comment header
133
+
'comment_header' => [
134
+
'text' => '', // the direct comment content text
135
+
'class' => '', // the class name tha has the header comment
136
+
'type' => 'DOCBLOCK', // the type of header comment to extract, accepts `DOCBLOCK`, `CONSTANT`, `COMMENT`
137
+
'path' => '', // the file path where the header comment to extract from
* @param string $sBlockNotation The first character set to mark the type of block. /** indicates a PHP doc-block. /*! is an important comment not to minify in JavaScript.
0 commit comments