PHP Класс Flarum\Formatter\Formatter

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

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

Свойство Тип Описание
$cache Illuminate\Contracts\Cache\Repository
$cacheDir string
$events Illuminate\Contracts\Events\Dispatcher

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

Метод Описание
__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.

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

Метод Описание
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.

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

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

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() публичный Метод

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

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

Get a TextFormatter component.
protected getComponent ( string $name ) : mixed
$name string "renderer" or "parser"
Результат mixed

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

protected getConfigurator ( ) : s9e\TextFormatter\Configurator
Результат s9e\TextFormatter\Configurator

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

Get the formatter JavaScript.
public getJs ( ) : string
Результат string

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

Get the parser.
protected getParser ( mixed $context = null ) : s9e\TextFormatter\Parser
$context mixed
Результат s9e\TextFormatter\Parser

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

Get the renderer.
protected getRenderer ( mixed $context = null ) : s9e\TextFormatter\Renderer
$context mixed
Результат s9e\TextFormatter\Renderer

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

Parse text.
public parse ( string $text, mixed $context = null ) : string
$text string
$context mixed
Результат string

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

Render parsed XML.
public render ( string $xml, mixed $context = null ) : string
$xml string
$context mixed
Результат string

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

Unparse XML.
public unparse ( string $xml ) : string
$xml string
Результат string

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

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

protected Repository,Illuminate\Contracts\Cache $cache
Результат Illuminate\Contracts\Cache\Repository

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

protected string $cacheDir
Результат string

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

protected Dispatcher,Illuminate\Contracts\Events $events
Результат Illuminate\Contracts\Events\Dispatcher