PHP Class Flarum\Formatter\Formatter

Afficher le fichier Open project: flarum/core Class Usage Examples

Protected Properties

Свойство Type Description
$cache Illuminate\Contracts\Cache\Repository
$cacheDir string
$events Illuminate\Contracts\Events\Dispatcher

Méthodes publiques

Méthode Description
__construct ( Illuminate\Contracts\Cache\Repository $cache, Illuminate\Contracts\Events\Dispatcher $events, string $cacheDir )
flush ( ) Flush the cache so that the formatter components are regenerated.
getJs ( ) : string Get the formatter JavaScript.
parse ( string $text, mixed $context = null ) : string Parse text.
render ( string $xml, mixed $context = null ) : string Render parsed XML.
unparse ( string $xml ) : string Unparse XML.

Méthodes protégées

Méthode Description
configureExternalLinks ( s9e\TextFormatter\Configurator $configurator )
getComponent ( string $name ) : mixed Get a TextFormatter component.
getConfigurator ( ) : s9e\TextFormatter\Configurator
getParser ( mixed $context = null ) : s9e\TextFormatter\Parser Get the parser.
getRenderer ( mixed $context = null ) : s9e\TextFormatter\Renderer Get the renderer.

Method Details

__construct() public méthode

public __construct ( Illuminate\Contracts\Cache\Repository $cache, Illuminate\Contracts\Events\Dispatcher $events, string $cacheDir )
$cache Illuminate\Contracts\Cache\Repository
$events Illuminate\Contracts\Events\Dispatcher
$cacheDir string

flush() public méthode

Flush the cache so that the formatter components are regenerated.
public flush ( )

getComponent() protected méthode

Get a TextFormatter component.
protected getComponent ( string $name ) : mixed
$name string "renderer" or "parser"
Résultat mixed

getConfigurator() protected méthode

protected getConfigurator ( ) : s9e\TextFormatter\Configurator
Résultat s9e\TextFormatter\Configurator

getJs() public méthode

Get the formatter JavaScript.
public getJs ( ) : string
Résultat string

getParser() protected méthode

Get the parser.
protected getParser ( mixed $context = null ) : s9e\TextFormatter\Parser
$context mixed
Résultat s9e\TextFormatter\Parser

getRenderer() protected méthode

Get the renderer.
protected getRenderer ( mixed $context = null ) : s9e\TextFormatter\Renderer
$context mixed
Résultat s9e\TextFormatter\Renderer

parse() public méthode

Parse text.
public parse ( string $text, mixed $context = null ) : string
$text string
$context mixed
Résultat string

render() public méthode

Render parsed XML.
public render ( string $xml, mixed $context = null ) : string
$xml string
$context mixed
Résultat string

unparse() public méthode

Unparse XML.
public unparse ( string $xml ) : string
$xml string
Résultat string

Property Details

$cache protected_oe property

protected Repository,Illuminate\Contracts\Cache $cache
Résultat Illuminate\Contracts\Cache\Repository

$cacheDir protected_oe property

protected string $cacheDir
Résultat string

$events protected_oe property

protected Dispatcher,Illuminate\Contracts\Events $events
Résultat Illuminate\Contracts\Events\Dispatcher