PHP Класс MetaSubtitle

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

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

Метод Описание
MetaSubtitle ( string $p_number = null, $p_fieldName = null, string $p_count = null, string $p_name = null, string $p_content = null, string $p_formattingStart = '', string $p_formattingEnd = '' ) Constructor
ProcessImageLink ( array $p_matches ) : string Process the image statement given in Campsite internal formatting.
ProcessInternalLink ( array $p_matches ) : string Process the internal link statement given in Campsite internal formatting.
ProcessSnippet ( array $p_matches ) : string Process the Snippet markup and return the Snippet rendered
ReadSubtitles ( string $p_content, $p_fieldName, string $p_firstSubtitle = '', $p_headerFormatStart = null, $p_headerFormatEnd = null ) : array Reads the subtitles from the given content
__get ( $p_property )
same_as ( mix $p_otherObject ) : boolean Returns true if the current object is the same type as the given object then has the same value.

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

Метод Описание
getFormattedName ( string $p_formattingStart = '<p>', string $p_formattingEnd = '</p>' ) : string Returns the formatted subtitle name
trigger_invalid_property_error ( $p_property, $p_smarty = null )

Приватные методы

Метод Описание
GetFindPattern ( ) : string Returns the pattern used to find a subtitle in the article content field
GetSplitPattern ( ) : string Returns the pattern used to split the content in subtitles
ProcessContent ( string $p_content ) : string Process the body field content (except subtitles): - internal links - image links

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

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

Constructor
public MetaSubtitle ( string $p_number = null, $p_fieldName = null, string $p_count = null, string $p_name = null, string $p_content = null, string $p_formattingStart = '', string $p_formattingEnd = '' )
$p_number string
$p_count string
$p_name string
$p_content string
$p_formattingStart string
$p_formattingEnd string

ProcessSnippet() публичный статический Метод

Process the Snippet markup and return the Snippet rendered
public static ProcessSnippet ( array $p_matches ) : string
$p_matches array
Результат string

ReadSubtitles() публичный статический Метод

Reads the subtitles from the given content
public static ReadSubtitles ( string $p_content, $p_fieldName, string $p_firstSubtitle = '', $p_headerFormatStart = null, $p_headerFormatEnd = null ) : array
$p_content string
$p_firstSubtitle string
Результат array of MetaSubtitle

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

public __get ( $p_property )

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

Returns the formatted subtitle name
protected getFormattedName ( string $p_formattingStart = '<p>', string $p_formattingEnd = '</p>' ) : string
$p_formattingStart string
$p_formattingEnd string
Результат string

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

Returns true if the current object is the same type as the given object then has the same value.
public same_as ( mix $p_otherObject ) : boolean
$p_otherObject mix
Результат boolean

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

protected trigger_invalid_property_error ( $p_property, $p_smarty = null )