HookDocsGenerator
in package
Generate documentation for hooks in WC
Table of Contents
- HOOKS_TEMPLATE_PATH = 'docs/api/hooks/hooks.html'
- Hooks template path.
- SEARCH_INDEX_PATH = 'docs/api/js/searchIndex.js'
- Search index path.
- SOURCE_PATH = ''
- Source path.
- $found_files : array<string|int, mixed>
- List of files found.
- applyChanges() : mixed
- Apply changes to build/.
- getDelimitedListOutput() : string
- Get delimited list output.
- getFileLink() : string
- Get file link.
- getFiles() : array<string|int, mixed>
- Get files.
- getFilesToScan() : array<string|int, mixed>
- Get files to scan.
- getFileURL() : string
- Get file URL.
- getHooks() : array<string|int, mixed>
- Get hooks.
- getJSOutput() : string
- Get JS output.
Constants
HOOKS_TEMPLATE_PATH
Hooks template path.
protected
mixed
HOOKS_TEMPLATE_PATH
= 'docs/api/hooks/hooks.html'
SEARCH_INDEX_PATH
Search index path.
protected
mixed
SEARCH_INDEX_PATH
= 'docs/api/js/searchIndex.js'
SOURCE_PATH
Source path.
protected
mixed
SOURCE_PATH
= ''
Properties
$found_files
List of files found.
protected
static array<string|int, mixed>
$found_files
= []
Methods
applyChanges()
Apply changes to build/.
public
static applyChanges() : mixed
Return values
mixed —getDelimitedListOutput()
Get delimited list output.
protected
static getDelimitedListOutput(array<string|int, mixed> $hook_list, array<string|int, mixed> $files_to_scan) : string
Parameters
- $hook_list : array<string|int, mixed>
-
List of hooks.
- $files_to_scan : array<string|int, mixed>
-
List of files to scan.
Return values
string —getFileLink()
Get file link.
protected
static getFileLink(array<string|int, mixed> $file) : string
Parameters
- $file : array<string|int, mixed>
-
File data.
Return values
string —getFiles()
Get files.
protected
static getFiles(string $pattern, int $flags[, string $path = '' ]) : array<string|int, mixed>
Parameters
- $pattern : string
-
Search pattern.
- $flags : int
-
Glob flags.
- $path : string = ''
-
Directory path.
Return values
array<string|int, mixed> —getFilesToScan()
Get files to scan.
protected
static getFilesToScan() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFileURL()
Get file URL.
protected
static getFileURL(array<string|int, mixed> $file) : string
Parameters
- $file : array<string|int, mixed>
-
File data.
Return values
string —getHooks()
Get hooks.
protected
static getHooks(array<string|int, mixed> $files_to_scan) : array<string|int, mixed>
Parameters
- $files_to_scan : array<string|int, mixed>
-
Files to scan.
Return values
array<string|int, mixed> —getJSOutput()
Get JS output.
protected
static getJSOutput(array<string|int, mixed> $hook_list) : string
Parameters
- $hook_list : array<string|int, mixed>
-
List of hooks.