Source Code Docs

Laradocgen
in package

Package Singleton Class.

Bootstraps the application services and serves as an interface to the configuration

Accessible through the facade

Tags
see
LaradocgenFacade

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

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
example

Laradocgen::getBuildFilepath('index.md') returns /home/user/laravel-project/public/docs/index.md

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 /public/docs/

Tags
see
PathController::getBuildPath()
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
example

RealtimeCompiler::getStyles()

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
example

Laradocgen::getSourceFilepath('index.md') returns /home/user/laravel-project/resources/docs/index.md

Return values
string

$filepath full path to the file

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
Tags
todo

Automatically generate files based on stubs

returns

void

throws
Exception

if a required file is missing

Return values
void

Search results