class Configurator implements ConfigProvider

Properties

AttributeFilterCollection $attributeFilters
BundleGenerator $bundleGenerator
JavaScript $javascript
string $phpHeader
PluginCollection $plugins
array $registeredVars
Rendering $rendering
Ruleset $rootRules
RulesGenerator $rulesGenerator
TagCollection $tags
TemplateChecker $templateChecker
TemplateNormalizer $templateNormalizer
Configurator $Autoemail

Autoemail plugin's configurator

$Autolink

Autolink plugin's configurator

Configurator $Autovideo

Autovideo plugin's configurator

Configurator $BBCodes

BBCodes plugin's configurator

Configurator $Censor

Censor plugin's configurator

Configurator $Emoji

Emoji plugin's configurator

Configurator $Emoticons

Emoticons plugin's configurator

Configurator $Escaper

Escaper plugin's configurator

Configurator $FancyPants

FancyPants plugin's configurator

Configurator $HTMLComments

HTMLComments plugin's configurator

Configurator $HTMLElements

HTMLElements plugin's configurator

Configurator $HTMLEntities

HTMLEntities plugin's configurator

Configurator $Keywords

Keywords plugin's configurator

Configurator $Litedown

Litedown plugin's configurator

Configurator $MediaEmbed

MediaEmbed plugin's configurator

Configurator $PipeTables

PipeTables plugin's configurator

Configurator $Preg

Preg plugin's configurator

UrlConfig $urlConfig

Default URL config

Methods

__construct()

Constructor

mixed
__get(string $k)

Magic __get automatically loads plugins, returns registered vars

bool
__isset(string $k)

Magic __isset checks existence in the plugins collection and registered vars

mixed
__set(string $k, mixed $v)

Magic __set adds to the plugins collection, registers vars

mixed
__unset(string $k)

Magic __set removes plugins from the plugins collection, unregisters vars

void
enableJavaScript()

Enable the creation of a JavaScript parser

array
finalize()

Finalize this configuration and return all the relevant objects

void
loadBundle(string $bundleName)

Load a bundle into this configuration

bool
saveBundle(string $className, string $filepath, array $options = [])

Create and save a bundle based on this configuration

array|Dictionary|null
asConfig()

Generate and return the complete config array

void
addTagRules()

Add the rules generated by $this->rulesGenerator

Details

at line 121
__construct()

Constructor

Prepares the collections that hold tags and filters, the UrlConfig object as well as the various helpers required to generate a full config.

at line 141
mixed __get(string $k)

Magic __get automatically loads plugins, returns registered vars

Parameters

string $k

Property name

Return Value

mixed

at line 164
bool __isset(string $k)

Magic __isset checks existence in the plugins collection and registered vars

Parameters

string $k

Property name

Return Value

bool

at line 181
mixed __set(string $k, mixed $v)

Magic __set adds to the plugins collection, registers vars

Parameters

string $k

Property name

mixed $v

Property value

Return Value

mixed

at line 199
mixed __unset(string $k)

Magic __set removes plugins from the plugins collection, unregisters vars

Parameters

string $k

Property name

Return Value

mixed

at line 216
void enableJavaScript()

Enable the creation of a JavaScript parser

Return Value

void

at line 229
array finalize()

Finalize this configuration and return all the relevant objects

Return Value

array

One "parser" element and one "renderer" element unless specified otherwise

at line 271
void loadBundle(string $bundleName)

Load a bundle into this configuration

Parameters

string $bundleName

Name of the bundle

Return Value

void

at line 292
bool saveBundle(string $className, string $filepath, array $options = [])

Create and save a bundle based on this configuration

Parameters

string $className

Name of the bundle class

string $filepath

Path where to save the bundle file

array $options

Options passed to the bundle generator

Return Value

bool

Whether the write succeeded

at line 304
array|Dictionary|null asConfig()

Generate and return the complete config array

Return Value

array|Dictionary|null

at line 355
protected void addTagRules()

Add the rules generated by $this->rulesGenerator

Return Value

void