PHP Class MetaSubtitle

Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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 méthode

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

ReadSubtitles() public static méthode

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
Résultat array of MetaSubtitle

__get() public méthode

public __get ( $p_property )

getFormattedName() protected méthode

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

same_as() public méthode

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
Résultat boolean

trigger_invalid_property_error() protected méthode

protected trigger_invalid_property_error ( $p_property, $p_smarty = null )