[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/phpbb/textformatter/s9e/ -> factory.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 676 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

factory:: (11 methods):
  __construct()
  invalidate()
  tidy()
  get_configurator()
  regenerate()
  add_bbcode()
  configure_autolink()
  escape_html_attribute()
  get_default_bbcodes()
  extract_templates()
  merge_templates()


Class: factory  - X-Ref

Creates s9e\TextFormatter objects

__construct(\phpbb\textformatter\data_access $data_access, \phpbb\cache\driver\driver_interface $cache, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\textformatter\s9e\link_helper $link_helper, \phpbb\log\log_interface $log, $cache_dir, $cache_key_parser, $cache_key_renderer)   X-Ref
Constructor

param: \phpbb\textformatter\data_access $data_access
param: \phpbb\cache\driver\driver_interface $cache
param: \phpbb\event\dispatcher_interface $dispatcher
param: \phpbb\config\config $config
param: \phpbb\textformatter\s9e\link_helper $link_helper
param: \phpbb\log\log_interface $log
param: string $cache_dir          Path to the cache dir
param: string $cache_key_parser   Cache key used for the parser
param: string $cache_key_renderer Cache key used for the renderer

invalidate()   X-Ref
{@inheritdoc}


tidy()   X-Ref
{@inheritdoc}

Will remove old renderers from the cache dir but won't touch the current renderer

get_configurator()   X-Ref
Generate and return a new configured instance of s9e\TextFormatter\Configurator

return: Configurator

regenerate()   X-Ref
No description

add_bbcode(Configurator $configurator, $usage, $template)   X-Ref
Add a BBCode to given configurator

param: Configurator $configurator
param: string       $usage
param: string       $template
return: void

configure_autolink(Configurator $configurator)   X-Ref
Configure the Autolink / Autoemail plugins used to linkify text

param: \s9e\TextFormatter\Configurator $configurator
return: void

escape_html_attribute($value)   X-Ref
Escape a literal to be used in an HTML attribute in an XSL template

Escapes "HTML special chars" for obvious reasons and curly braces to avoid them
being interpreted as an attribute value template

param: string $value Original string
return: string        Escaped string

get_default_bbcodes($configurator)   X-Ref
Return the default BBCodes configuration

return: array 2D array. Each element has a 'usage' key, a 'template' key, and an optional 'options' key

extract_templates($template)   X-Ref
Extract and recompose individual BBCode templates from a style's template file

param: string $template Style template (bbcode.html)
return: array Associative array matching BBCode names to their template

merge_templates(array $style_templates)   X-Ref
Merge the templates from any number of styles into one BBCode template

When multiple templates are available for the same BBCode (because of multiple styles) we
merge them into a single template that uses an xsl:choose construct that determines which
style to use at rendering time.

param: array  $style_templates Associative array matching style_ids to their template
return: string



Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1