content
Packages
Interfaces
Classes
Files

Class: ContentFormattingFactory

Source Location: /content/parser/content_formatting_factory.class.php [line 40]

Class Overview


This class is approximatively a factory which provides objets capable to format some content. The text formatting uses a syntax, PHPBoost supports both the BBCode syntax and a WYSIWYG tool syntax (TinyMCE). You can choose the formatting type you want to deal with.

Author(s):



Class Details

This class is approximatively a factory which provides objets capable to format some content. The text formatting uses a syntax, PHPBoost supports both the BBCode syntax and a WYSIWYG tool syntax (TinyMCE). You can choose the formatting type you want to deal with.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor ContentFormattingFactory [line 52]

ContentFormattingFactory ContentFormattingFactory( [string $language_type = false])
Builds a ContentFormattingFactoryy object

Parameters:

string   $language_type   The language in which must work the factory. One of the following elements:
  • BBCODE_LANGUAGE if you want to force the BBCode language
  • TINYMCE_LANGUAGE if you want to force the TinyMCE formatting editor
  • DEFAULT_LANGUAGE if you want to use the default language of the site. If the user changed it, it will be the language he chosed, otherwise it will be the website default language.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_editor [line 164]

ContentParser get_editor( )
Returns an editor object which will display the editor corresponding to the language you chose.

Tags:

  • return: The editor to use.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_language [line 87]

string get_language( )
Returns the language of the factory

Tags:

  • return: Language (BBCODE_LANGUAGE, TINYMCE_LANGUAGE or DEFAULT_LANGUAGE)
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_parser [line 96]

ContentParser get_parser( )
Returns a parser which will work in the language you chose.

Tags:

  • return: The parser to use to parse you formatting
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_second_parser [line 154]

ContentSecondParser get_second_parser( )
Returns a second parser which will work in the language you chose.

Tags:

  • return: The second parser to use just before displaying you formatted text
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_unparser [line 125]

ContentUnparser get_unparser( )
Returns a unparser which will work in the language you chose.

Tags:

  • return: The unparser to use to unparse you formatting
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_user_editor [line 192]

string get_user_editor( )
Returns the name of the editor of the current user (chosen in its profile).

Tags:

  • return: The editor used by the current user.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_language [line 70]

void set_language( [string $language_type = DEFAULT_LANGUAGE])
Changes the language of the factory

Parameters:

string   $language_type   The language in which must work the factory. One of the following elements:
  • BBCODE_LANGUAGE if you want to force the BBCode language
  • TINYMCE_LANGUAGE if you want to force the TinyMCE formatting editor
  • DEFAULT_LANGUAGE if you want to use the default language of the site. If the user changed it, it will be the language he chosed, otherwise it will be the website default language.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

static method get_available_tags [line 204]

static string[] get_available_tags( )
Returns the map of all the formatting types supported by the PHPBoost formatting editors and parsers. The keys of the map are the tags identifiers and the values the tags names.

Tags:

  • return: The map
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 250]   string  $language_type  =  DEFAULT_LANGUAGE

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    Documentation generated on Tue, 28 Jul 2009 22:43:35 +0200 by phpDocumentor 1.4.1