PHP Class MetaSubtitle

Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
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.

Protected Methods

Method Description
getFormattedName ( string $p_formattingStart = '<p>', string $p_formattingEnd = '</p>' ) : string Returns the formatted subtitle name
trigger_invalid_property_error ( $p_property, $p_smarty = null )

Private Methods

Method Description
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

Method Details

MetaSubtitle() public method

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() public static method

Process the Snippet markup and return the Snippet rendered
public static ProcessSnippet ( array $p_matches ) : string
$p_matches array
return string

ReadSubtitles() public static method

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
return array of MetaSubtitle

__get() public method

public __get ( $p_property )

getFormattedName() protected method

Returns the formatted subtitle name
protected getFormattedName ( string $p_formattingStart = '<p>', string $p_formattingEnd = '</p>' ) : string
$p_formattingStart string
$p_formattingEnd string
return string

same_as() public method

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
return boolean

trigger_invalid_property_error() protected method

protected trigger_invalid_property_error ( $p_property, $p_smarty = null )