content
Packages
Interfaces
Classes
Files

Class: ContentParser

Source Location: /content/parser/content_parser.class.php [line 36]

Class Overview

Parser
   |
   --ContentParser
This class is abstract. It contains tools that are usefull for implement a content parser.

Author(s):



Class Details

This class is abstract. It contains tools that are usefull for implement a content parser.

Tags:

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


Class Methods

constructor ContentParser [line 42]

ContentParser ContentParser( )
Buils a ContentParser object.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_forbidden_tags [line 77]

string[] get_forbidden_tags( )
Gets the forbidden tags.

Tags:

  • return: List of the forbidden tags
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method parse [line 55]

void parse( )
Parses the content of the parser

Tags:

  • return: You will find the result by using the get_content method

Overridden in child classes as:

TinyMCEParser::parse()
Parses the content of the parser. Translates the whole content from the TinyMCE syntax to the PHPBoost one.
BBCodeParser::parse()
Parses the parser content from BBCode to XHTML.

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

method set_forbidden_tags [line 65]

void set_forbidden_tags( string[] $forbidden_tags)
Sets the tags which mustn't be parsed.

Parameters:

string[]   $forbidden_tags   list of the name of the tags which mustn't be parsed.
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_html_auth [line 87]

void set_html_auth( mixed[] $array_auth)
Sets the required authorizations that are necessary to post some HTML code which will be displayed by the web browser.

Parameters:

mixed[]   $array_auth   authorization array
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 319]   string[]  $forbidden_tags  = array()

Tags:

    [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
    [line 315]   string[]  $html_auth  = array()

    Tags:

      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
      [line 309]   mixed  $tag  = array('b', 'i', 'u', 's', 'title', 'stitle', 'style', 'url',     'img', 'quote', 'hide', 'list', 'color', 'bgcolor', 'font', 'size', 'align', 'float', 'sup',     'sub', 'indent', 'pre', 'table', 'swf', 'movie', 'sound', 'code', 'math', 'anchor', 'acronym')
      [ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

      Child classes:

      TinyMCEParser
      This class enables to use TinyMCE without breaking the compatibility with the BBCode formatting. PHPBoost has a reference syntax, it in HTML with specific CSS classes. The HTML code generated by TinyMCE must be modified to conform itself to this specific syntax. This class makes the translation from the TinyMCE HTML to the PHPBoost HTML.
      BBCodeParser
      Converts the PHPBoost BBCode language to the XHTML language which is stocked in the database and can be displayed nearly directly. It parses only the authorized tags (defined in the parent class which is ContentParser).

      Inherited Methods

      Class: Parser

      Parser::Parser()
      Builds a Parser object.
      Parser::get_content()
      Returns the content of the parser. If you called a method which parses the content, this content will be parsed.
      Parser::get_page_path()
      Returns the page path
      Parser::get_path_to_root()
      Returns the path to root attribute.
      Parser::set_content()
      Sets the content of the parser. When you will call a parse method, it will deal with this content.
      Parser::set_page_path()
      Sets the page path
      Parser::set_path_to_root()
      Sets the reference path for relative URL


      Documentation generated on Tue, 28 Jul 2009 22:43:35 +0200 by phpDocumentor 1.4.1
      Annonces