BumbleDocGen / Technical description of the project / Parser / Source locators
Source locators are needed so that the parser knows which files to parse, or to get data on a specific file after the primary parsing procedure
Source locators are set in the configuration:
source_locators:
- class: \BumbleDocGen\Core\Parser\SourceLocator\RecursiveDirectoriesSourceLocator
arguments:
directories:
- "%project_root%/src"
- "%project_root%/selfdoc"
You can create your own source locators or use any existing ones. All source locators must implement the SourceLocatorInterface interface.
Common source locators:
- DirectoriesSourceLocator - Loads all files from the specified directory
- FileIteratorSourceLocator - Loads all files using an iterator
- RecursiveDirectoriesSourceLocator - Loads all files from the specified directories, which are traversed recursively
- SingleFileSourceLocator - Loads one specific file by its path
PHP source locators:
- AsyncSourceLocator - Lazy loading classes. Cannot be used for initial parsing of files, only for getting specific documents
Last page committer: fshcherbanich <[email protected]>
Last modified date: Sat Oct 28 11:03:31 2023 +0300
Page content update date: Mon Nov 06 2023
Made with Bumble Documentation Generator