Craft Themes (4.x)

Stub extends BaseObject
in package

Table of Contents

$basePath  : string
getRawContent()  : string
Get the content of the source stub
write()  : mixed
Write stub on disk
ensureFileDoesntExists()  : mixed
Check if the file already exists
ensureFolderExists()  : mixed
Create the direcory for this stub if not there
getDestination()  : string
Get the destination file path
getSourceStub()  : string
Get the source stub file path
getStub()  : string
Get the source stub file name
getVariables()  : array<string|int, mixed>
Get variables to replace in the source stub

Properties

$basePath

public string $basePath

Methods

getRawContent()

Get the content of the source stub

public getRawContent() : string
Return values
string

write()

Write stub on disk

public write() : mixed
Return values
mixed

ensureFileDoesntExists()

Check if the file already exists

protected ensureFileDoesntExists() : mixed
Tags
throws
CreatorException
Return values
mixed

ensureFolderExists()

Create the direcory for this stub if not there

protected ensureFolderExists() : mixed
Return values
mixed

getDestination()

Get the destination file path

protected abstract getDestination() : string
Return values
string

getSourceStub()

Get the source stub file path

protected getSourceStub() : string
Return values
string

getStub()

Get the source stub file name

protected abstract getStub() : string
Return values
string

getVariables()

Get variables to replace in the source stub

protected abstract getVariables() : array<string|int, mixed>
Return values
array<string|int, mixed>

Search results