PHP Class DummyPlugin

Inheritance: implements Plugin
Datei anzeigen Open project: gilbitron/pico Class Usage Examples

Protected Properties

Property Type Description
$dependsOn string[] ..
$enabled boolean This plugin is enabled by default?

Public Methods

Method Description
on404ContentLoaded ( &$rawContent ) : void Triggered after Pico has read the contents of the 404 file
on404ContentLoading ( &$file ) : void Triggered before Pico reads the contents of a 404 file
onConfigLoaded ( array &$config ) : void Triggered after Pico has read its configuration
onContentLoaded ( &$rawContent ) : void Triggered after Pico has read the contents of the file to serve
onContentLoading ( &$file ) : void Triggered before Pico reads the contents of the file to serve
onContentParsed ( &$content ) : void Triggered after Pico has parsed the contents of the file to serve
onContentParsing ( &$rawContent ) : void Triggered before Pico parses the pages content
onContentPrepared ( &$content ) : void Triggered after Pico has prepared the raw file contents for parsing
onMetaHeaders ( array &$headers ) : void Triggered when Pico reads its known meta header fields
onMetaParsed ( array &$meta ) : void Triggered after Pico has parsed the meta header
onMetaParsing ( &$rawContent, array &$headers ) : void Triggered before Pico parses the meta header
onPageRendered ( &$output ) : void Triggered after Pico has rendered the page
onPageRendering ( Twig_Environment &$twig, array &$twigVariables, &$templateName ) : void Triggered before Pico renders the page
onPagesLoaded ( array &$pages, array &$currentPage = null, array &$previousPage = null, array &$nextPage = null ) : void Triggered after Pico has read all known pages
onPagesLoading ( ) : void Triggered before Pico reads all known pages
onPluginsLoaded ( array &$plugins ) : void Triggered after Pico has loaded all available plugins
onRequestFile ( &$file ) : void Triggered after Pico has discovered the content file to serve
onRequestUrl ( &$url ) : void Triggered after Pico has evaluated the request URL
onSinglePageLoaded ( array &$pageData ) : void Triggered when Pico reads a single page from the list of all known pages
onTwigRegistration ( ) : void Triggered before Pico registers the twig template engine

Method Details

on404ContentLoaded() public method

Triggered after Pico has read the contents of the 404 file
See also: Pico::getRawContent()
public on404ContentLoaded ( &$rawContent ) : void
return void

on404ContentLoading() public method

Triggered before Pico reads the contents of a 404 file
See also: Pico::load404Content()
See also: DummyPlugin::on404ContentLoaded()
public on404ContentLoading ( &$file ) : void
return void

onConfigLoaded() public method

Triggered after Pico has read its configuration
See also: Pico::getConfig()
public onConfigLoaded ( array &$config ) : void
$config array
return void

onContentLoaded() public method

Triggered after Pico has read the contents of the file to serve
See also: Pico::getRawContent()
public onContentLoaded ( &$rawContent ) : void
return void

onContentLoading() public method

Triggered before Pico reads the contents of the file to serve
See also: Pico::loadFileContent()
See also: DummyPlugin::onContentLoaded()
public onContentLoading ( &$file ) : void
return void

onContentParsed() public method

Triggered after Pico has parsed the contents of the file to serve
See also: Pico::getFileContent()
public onContentParsed ( &$content ) : void
return void

onContentParsing() public method

Triggered before Pico parses the pages content
See also: Pico::prepareFileContent()
See also: DummyPlugin::prepareFileContent()
See also: DummyPlugin::onContentParsed()
public onContentParsing ( &$rawContent ) : void
return void

onContentPrepared() public method

Triggered after Pico has prepared the raw file contents for parsing
See also: Pico::parseFileContent()
See also: DummyPlugin::onContentParsed()
public onContentPrepared ( &$content ) : void
return void

onMetaHeaders() public method

Triggered when Pico reads its known meta header fields
See also: Pico::getMetaHeaders()
public onMetaHeaders ( array &$headers ) : void
$headers array
return void

onMetaParsed() public method

Triggered after Pico has parsed the meta header
See also: Pico::getFileMeta()
public onMetaParsed ( array &$meta ) : void
$meta array
return void

onMetaParsing() public method

Triggered before Pico parses the meta header
See also: Pico::parseFileMeta()
See also: DummyPlugin::onMetaParsed()
public onMetaParsing ( &$rawContent, array &$headers ) : void
$headers array
return void

onPageRendered() public method

Triggered after Pico has rendered the page
public onPageRendered ( &$output ) : void
return void

onPageRendering() public method

Triggered before Pico renders the page
See also: Pico::getTwig()
See also: DummyPlugin::onPageRendered()
public onPageRendering ( Twig_Environment &$twig, array &$twigVariables, &$templateName ) : void
$twig Twig_Environment
$twigVariables array
return void

onPagesLoaded() public method

See {@link DummyPlugin::onSinglePageLoaded()} for details about the structure of the page data.
See also: Pico::getPages()
See also: Pico::getCurrentPage()
See also: Pico::getPreviousPage()
See also: Pico::getNextPage()
public onPagesLoaded ( array &$pages, array &$currentPage = null, array &$previousPage = null, array &$nextPage = null ) : void
$pages array
$currentPage array
$previousPage array
$nextPage array
return void

onPagesLoading() public method

Triggered before Pico reads all known pages
See also: Pico::readPages()
See also: DummyPlugin::onSinglePageLoaded()
See also: DummyPlugin::onPagesLoaded()
public onPagesLoading ( ) : void
return void

onPluginsLoaded() public method

This event is triggered nevertheless the plugin is enabled or not. It is NOT guaranteed that plugin dependencies are fulfilled!
See also: Pico::getPlugin()
See also: Pico::getPlugins()
public onPluginsLoaded ( array &$plugins ) : void
$plugins array
return void

onRequestFile() public method

Triggered after Pico has discovered the content file to serve
See also: Pico::getBaseUrl()
See also: Pico::getRequestFile()
public onRequestFile ( &$file ) : void
return void

onRequestUrl() public method

Triggered after Pico has evaluated the request URL
See also: Pico::getRequestUrl()
public onRequestUrl ( &$url ) : void
return void

onSinglePageLoaded() public method

The $pageData parameter consists of the following values: | Array key | Type | Description | | -------------- | ------ | ---------------------------------------- | | id | string | relative path to the content file | | url | string | URL to the page | | title | string | title of the page (YAML header) | | description | string | description of the page (YAML header) | | author | string | author of the page (YAML header) | | time | string | timestamp derived from the Date header | | date | string | date of the page (YAML header) | | date_formatted | string | formatted date of the page | | raw_content | string | raw, not yet parsed contents of the page | | meta | string | parsed meta data of the page |
See also: DummyPlugin::onPagesLoaded()
public onSinglePageLoaded ( array &$pageData ) : void
$pageData array
return void

onTwigRegistration() public method

Triggered before Pico registers the twig template engine
public onTwigRegistration ( ) : void
return void

Property Details

$dependsOn protected_oe property

..
See also: AbstractPicoPlugin::$dependsOn
protected string[] $dependsOn
return string[]

$enabled protected_oe property

This plugin is enabled by default?
See also: AbstractPicoPlugin::$enabled
protected bool $enabled
return boolean