PHP Класс phpbb\textreparser\base

Наследование: implements phpbb\textreparser\reparser_interface
Показать файл Открыть проект

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

Свойство Тип Описание
$name The reparser name
$save_changes Whether to save changes to the database

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

Метод Описание
disable_save ( ) Disable saving changes to the database
enable_save ( ) Enable saving changes to the database
get_max_id ( )
get_name ( ) : string Returns the name of the reparser
reparse_range ( $min_id, $max_id )
set_name ( string $name ) Sets the name of the reparser

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

Метод Описание
add_missing_fields ( array $record ) : array Add fields to given record, if applicable
get_records_by_range ( integer $min_id, integer $max_id ) : array Return all records in given range
guess_bbcode ( array $record, string $bbcode ) : boolean Guess whether given BBCode is in use in given record
guess_bbcodes ( array $record ) : boolean Guess whether any BBCode is in use in given record
guess_magic_url ( array $record ) : boolean Guess whether magic URLs are in use in given record
guess_smilies ( array $record ) : boolean Guess whether smilies are in use in given record
reparse_record ( array $record ) Reparse given record
save_record ( array $record )

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

add_missing_fields() защищенный метод

The enable_* fields are not always saved to the database. Sometimes we need to guess their original value based on the text content or possibly other fields
protected add_missing_fields ( array $record ) : array
$record array Original record
Результат array Complete record

disable_save() публичный метод

Disable saving changes to the database
public disable_save ( )

enable_save() публичный метод

Enable saving changes to the database
public enable_save ( )

get_max_id() абстрактный публичный метод

abstract public get_max_id ( )

get_name() публичный метод

Returns the name of the reparser
public get_name ( ) : string
Результат string Name of reparser

get_records_by_range() абстрактный защищенный метод

Return all records in given range
abstract protected get_records_by_range ( integer $min_id, integer $max_id ) : array
$min_id integer Lower bound
$max_id integer Upper bound
Результат array Array of records

guess_bbcode() защищенный метод

Guess whether given BBCode is in use in given record
protected guess_bbcode ( array $record, string $bbcode ) : boolean
$record array
$bbcode string
Результат boolean

guess_bbcodes() защищенный метод

Guess whether any BBCode is in use in given record
protected guess_bbcodes ( array $record ) : boolean
$record array
Результат boolean

guess_magic_url() защищенный метод

Guess whether magic URLs are in use in given record
protected guess_magic_url ( array $record ) : boolean
$record array
Результат boolean

guess_smilies() защищенный метод

Guess whether smilies are in use in given record
protected guess_smilies ( array $record ) : boolean
$record array
Результат boolean

reparse_range() публичный метод

public reparse_range ( $min_id, $max_id )

reparse_record() защищенный метод

Reparse given record
protected reparse_record ( array $record )
$record array Associative array containing the record's data

save_record() абстрактный защищенный метод

abstract protected save_record ( array $record )
$record array

set_name() публичный метод

Sets the name of the reparser
public set_name ( string $name )
$name string The reparser name

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

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

The reparser name
protected $name

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

Whether to save changes to the database
protected $save_changes