CI_Typography Class Reference

List of all members.

Public Member Functions

 CI_Typography ()
 auto_typography ($str, $reduce_linebreaks=FALSE)
 format_characters ($str)
 _format_newlines ($str)
 nl2br_except_pre ($str)

Public Attributes

 $block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul'
 $skip_elements = 'p|pre|ol|ul|dl|object|table'
 $inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var'
 $inner_block_required = array('blockquote')
 $last_block_element = ''
 $protect_braced_quotes = FALSE


Member Function Documentation

CI_Typography::_format_newlines ( str  ) 

Format Newlines

Converts newline characters into either

tags or

public

Parameters:
string 
Returns:
string

CI_Typography::auto_typography ( str,
reduce_linebreaks = FALSE 
)

Auto Typography

This function converts text, making it typographically correct:

  • Converts double spaces into paragraphs.
  • Converts single line breaks into
    tags
  • Converts single and double quotes into correctly facing curly quote entities.
  • Converts three dots into ellipsis.
  • Converts double dashes into em-dashes.

Converts two spaces into entities

public

Parameters:
string 
bool whether to reduce more then two consecutive newlines to two
Returns:
string

CI_Typography::CI_Typography (  ) 

Nothing to do here...

CI_Typography::format_characters ( str  ) 

Format Characters

This function mainly converts double and single quotes to curly entities, but it also converts em-dashes, double spaces, and ampersands

public

Parameters:
string 
Returns:
string

CI_Typography::nl2br_except_pre ( str  ) 

Convert newlines to HTML line breaks except within PRE tags

public

Parameters:
string 
Returns:
string


Member Data Documentation

CI_Typography::$block_elements = 'address|blockquote|div|dl|fieldset|form|h\d|hr|noscript|object|ol|p|pre|script|table|ul'

CI_Typography::$inline_elements = 'a|abbr|acronym|b|bdo|big|br|button|cite|code|del|dfn|em|i|img|ins|input|label|map|kbd|q|samp|select|small|span|strong|sub|sup|textarea|tt|var'

CI_Typography::$inner_block_required = array('blockquote')

CI_Typography::$last_block_element = ''

CI_Typography::$protect_braced_quotes = FALSE

CI_Typography::$skip_elements = 'p|pre|ol|ul|dl|object|table'


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

Generated on Sun Nov 16 16:09:17 2008 for CodeIgniter by  doxygen 1.5.7.1