Laradocgen
in package
Package Singleton Class.
Bootstraps the application services and serves as an interface to the configuration
Accessible through the facade
Tags
Table of Contents
- build() : StaticPageBuilder
- Build the static website files.
- getBuildFilepath() : string
- Get the path of a file in the build directory.
- getBuildPath() : string
- Get the Build Path.
- getMarkdownFileSlugsArray() : array<string|int, mixed>
- Get an array of all the markdown files
- getSiteName() : string
- Get the name of the documentation site.
- getSourceFileContents() : string|false
- Get the contents of a file in the source directory.
- getSourceFilepath() : string
- Get the path of a file in the source directory.
- getSourcePath() : string
- Get the Source Path.
- validateExistenceOfSlug() : bool
- validateSourceFiles() : void
- Check if the necessary files to build the site exists.
Methods
build()
Build the static website files.
public
static build() : StaticPageBuilder
Start the build process by invoking the page builder class
Return values
StaticPageBuilder —getBuildFilepath()
Get the path of a file in the build directory.
public
static getBuildFilepath(string $filename[, string|null $directory = null ]) : string
Parameters
- $filename : string
-
to retrieve
- $directory : string|null = null
-
optionally specify a subdirectory of the file
Tags
Return values
string —$filepath full path to the file
getBuildPath()
Get the Build Path.
public
static getBuildPath() : string
Returns the directory where the static HTML files are stored once created
Usually in
Tags
Return values
string —$buildPath
getMarkdownFileSlugsArray()
Get an array of all the markdown files
public
static getMarkdownFileSlugsArray() : array<string|int, mixed>
Returns the markdown files in the source directory as slugs (without the extension)
Return values
array<string|int, mixed> —getSiteName()
Get the name of the documentation site.
public
static getSiteName() : string
Is dynamically generated from the App name unless overridden in the config.
Return values
string —$siteName
getSourceFileContents()
Get the contents of a file in the source directory.
public
static getSourceFileContents(string $filename) : string|false
Returns false if the file does not exist
Parameters
- $filename : string
-
to search for
Tags
Return values
string|false —$filepath the full path if file exists, else false
getSourceFilepath()
Get the path of a file in the source directory.
public
static getSourceFilepath(string $filename[, string|null $directory = null ]) : string
Parameters
- $filename : string
-
to retrieve
- $directory : string|null = null
-
optionally specify a subdirectory of the file
Tags
Return values
string —$filepath full path to the file
getSourcePath()
Get the Source Path.
public
static getSourcePath() : string
Tags
Return values
string —$sourcePath
validateExistenceOfSlug()
public
static validateExistenceOfSlug(string $slug) : bool
Parameters
- $slug : string
Return values
bool —validateSourceFiles()
Check if the necessary files to build the site exists.
public
static validateSourceFiles() : void