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 String with words colorized public

Definition at line 234 of file flay.php.

Flay::extractWords ( string  ) 

Return the words of the string as an array.

Parameters:
string $string
Returns:
array Array of words public

Definition at line 192 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 Fragment public

Definition at line 273 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 String with words marked
See also:
colorMark public

Definition at line 206 of file flay.php.

Flay::toClean ( text  ) 

Returns given text with tags stripped out.

Parameters:
string $text Text to clean
Returns:
string Cleaned text public

Definition at line 250 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 public

Definition at line 77 of file flay.php.

References $out, $text, and $url.

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

Flay::toParsedAndClean ( text  ) 

Return parsed text with tags stripped out.

Parameters:
string $text Text to parse and clean
Returns:
string Cleaned text public

Definition at line 261 of file flay.php.

References toHtml().


Member Data Documentation

Flay::$allow_html = false

Definition at line 58 of file flay.php.

Flay::$text = null

Definition at line 51 of file flay.php.

Referenced by toHtml().


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