PHP Класс Gregwar\RST\Builder

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$beforeHooks Hooks before the parsing on the environment
$directory Source and target directory
$documents Parsed documents waiting to be rendered
$errorManager Error manager
$hooks Hooks after the parsing
$indexName Tree index name
$kernel Kernel
$metas Metas for documents
$parseQueue Queue of documents to be parsed
$states States (decision) of the scanned documents
$targetDirectory
$toCopy Files to copy at the end of the build
$toMkdir
$verbose Verbose build ?

Открытые методы

Метод Описание
__construct ( $kernel = null )
addBeforeHook ( $function ) Adds an hook which will be called on each environment during building
addHook ( $function ) Adds an hook which will be called on each document after parsing
build ( $directory, $targetDirectory = 'output', $verbose = true )
copy ( $source, $destination = null ) Add a file to copy
doCopy ( ) Run the copy
doMkdir ( ) Run the directories creation
getErrorManager ( )
getIndexName ( )
getRST ( $file ) Gets the .rst of a source file
getSourceFile ( $filename ) Gets the name of a source file
getTargetFile ( $filename ) Gets the name of a target file
getTargetOf ( $file ) Gets the name of a target for a file, for instance /introduction/part1 could be resolved into /path/to/introduction/part1.html
getUrl ( $document ) Gets the URL of a target file
mkdir ( $directory ) Creates a directory in the target
scan ( $file ) Scans a file, this will check the status of the file and tell if it needs to be parsed or not
scanMetas ( ) Scans all the metas
setIndexName ( $name )

Защищенные методы

Метод Описание
addToParseQueue ( $file ) Adding a file to the parse queue
display ( $text )
getFileToParse ( ) Returns the next file to parse
getMetaFile ( ) Get the meta file name
loadMetas ( ) Try to inport the metas from the meta files
parseAll ( ) Parses all the document that need to be parsed
render ( ) Renders all the pending documents
saveMetas ( ) Saving the meta files

Описание методов

__construct() публичный Метод

public __construct ( $kernel = null )

addBeforeHook() публичный Метод

Adds an hook which will be called on each environment during building
public addBeforeHook ( $function )

addHook() публичный Метод

Adds an hook which will be called on each document after parsing
public addHook ( $function )

addToParseQueue() защищенный Метод

Adding a file to the parse queue
protected addToParseQueue ( $file )

build() публичный Метод

public build ( $directory, $targetDirectory = 'output', $verbose = true )

copy() публичный Метод

Add a file to copy
public copy ( $source, $destination = null )

display() защищенный Метод

protected display ( $text )

doCopy() публичный Метод

Run the copy
public doCopy ( )

doMkdir() публичный Метод

Run the directories creation
public doMkdir ( )

getErrorManager() публичный Метод

public getErrorManager ( )

getFileToParse() защищенный Метод

Returns the next file to parse
protected getFileToParse ( )

getIndexName() публичный Метод

public getIndexName ( )

getMetaFile() защищенный Метод

Get the meta file name
protected getMetaFile ( )

getRST() публичный Метод

Gets the .rst of a source file
public getRST ( $file )

getSourceFile() публичный Метод

Gets the name of a source file
public getSourceFile ( $filename )

getTargetFile() публичный Метод

Gets the name of a target file
public getTargetFile ( $filename )

getTargetOf() публичный Метод

Gets the name of a target for a file, for instance /introduction/part1 could be resolved into /path/to/introduction/part1.html
public getTargetOf ( $file )

getUrl() публичный Метод

Gets the URL of a target file
public getUrl ( $document )

loadMetas() защищенный Метод

Try to inport the metas from the meta files
protected loadMetas ( )

mkdir() публичный Метод

Creates a directory in the target
public mkdir ( $directory )
$directory the directory name to create

parseAll() защищенный Метод

Parses all the document that need to be parsed
protected parseAll ( )

render() защищенный Метод

Renders all the pending documents
protected render ( )

saveMetas() защищенный Метод

Saving the meta files
protected saveMetas ( )

scan() публичный Метод

Scans a file, this will check the status of the file and tell if it needs to be parsed or not
public scan ( $file )

scanMetas() публичный Метод

Scans all the metas
public scanMetas ( )

setIndexName() публичный Метод

public setIndexName ( $name )

Описание свойств

$beforeHooks защищенное свойство

Hooks before the parsing on the environment
protected $beforeHooks

$directory защищенное свойство

Source and target directory
protected $directory

$documents защищенное свойство

Parsed documents waiting to be rendered
protected $documents

$errorManager защищенное свойство

Error manager
protected $errorManager

$hooks защищенное свойство

Hooks after the parsing
protected $hooks

$indexName защищенное свойство

Tree index name
protected $indexName

$kernel защищенное свойство

Kernel
protected $kernel

$metas защищенное свойство

Metas for documents
protected $metas

$parseQueue защищенное свойство

Queue of documents to be parsed
protected $parseQueue

$states защищенное свойство

States (decision) of the scanned documents
protected $states

$targetDirectory защищенное свойство

protected $targetDirectory

$toCopy защищенное свойство

Files to copy at the end of the build
protected $toCopy

$toMkdir защищенное свойство

protected $toMkdir

$verbose защищенное свойство

Verbose build ?
protected $verbose