Flay Class Reference

Inheritance diagram for Flay:

Object

List of all members.


Public Member Functions

 colorMark ($words, $string)
 extractWords ($string)
 fragment ($text, $length, $ellipsis= '...')
 markedSnippets ($words, $string, $max_snippets=5)
 toClean ($text)
 toHtml ($text=null, $bare=false, $allowHtml=false)
 toParsedAndClean ($text)

Public Attributes

 $allow_html = false
 $text = null

Detailed Description

Definition at line 44 of file flay.php.


Member Function Documentation

Flay::colorMark ( words,
string 
)

Returns string with EM elements with color classes added.

Parameters:
array $words Array of words to be colorized
string $string Text in which the words might be found
Returns:
string

Definition at line 228 of file flay.php.

Flay::extractWords ( string  ) 

Return the words of the string as an array.

Parameters:
string $string
Returns:
array Array of words

Definition at line 188 of file flay.php.

Flay::fragment ( text,
length,
ellipsis = '...' 
)

Return a fragment of a text, up to $length characters long, with an ellipsis after it.

Parameters:
string $text Text to be truncated.
integer $length Max length of text.
string $ellipsis Sign to print after truncated text.
Returns:
string

Definition at line 264 of file flay.php.

Flay::markedSnippets ( words,
string,
max_snippets = 5 
)

Return given string with words in array colorMarked, up to a number of times (defaults to 5).

Parameters:
array $words Words to look for and markup
string $string String to look in
integer $max_snippets Max number of snippets to extract
Returns:
string
See also:
colorMark

Definition at line 201 of file flay.php.

Flay::toClean ( text  ) 

Returns given text with tags stripped out.

Parameters:
string $text
Returns:
string

Definition at line 243 of file flay.php.

Flay::toHtml ( text = null,
bare = false,
allowHtml = false 
)

Returns given text translated to HTML using the Flay syntax.

Parameters:
string $text String to format
boolean $bare Set this to only do
transforms and > to >, no typography additions.
Parameters:
boolean $allowHtml Set this to trim whitespace and disable all HTML
Returns:
string Formatted text

Definition at line 74 of file flay.php.

References $text.

Referenced by TextHelper::flay(), and toParsedAndClean().

Flay::toParsedAndClean ( text  ) 

Return parsed text with tags stripped out.

Parameters:
string $text
Returns:
string

Definition at line 253 of file flay.php.

References toHtml().


Member Data Documentation

Flay::$allow_html = false

Definition at line 56 of file flay.php.

Flay::$text = null

Definition at line 50 of file flay.php.

Referenced by toHtml().


The documentation for this class was generated from the following file: