Apache Zeta Components - high quality PHP components

Apache Zeta Components Manual :: Docs For Class ezcDocumentCreoleWiki

Document::ezcDocumentCreoleWiki

Class ezcDocumentCreoleWiki

Document handler for Creole wiki text documents.

Creole wiki markup is a standardisation intiative for wiki markup languages, which all differ more or less slightly in the used markup syntax. The documentation can be found at:

http://www.wikicreole.org/wiki/Home

This document handler implements conversions for Crole wiki markup. The tokenizer, which differs for each wiki language, can be set directly, or you may use on of the other extended implementations for the specific sytaxes:

  • ezcDocumentConfluenceWiki
  • ezcDocumentCreoleWiki
  • ezcDocumentDokuwikiWiki
Each wiki syntax has some sort of plugin mechanism, which allows you to handle the contents of a special formatted syntax element using custom classes or external applications. You can register a plugin for this, which then need to "parse" the element contents itself and may return random docbook markup.

The basic conversion of a wiki document into a docbook document, using the default creole tokenizer, looks like:

  1.   $document = new ezcDocumentCreoleWiki();
  2.   $document->loadString( '
  3.   = Example text =
  4.  
  5.   Just some exaple paragraph with a heading, some **emphasis** markup and a
  6.   [[http://ezcomponents.org|link]].' );
  7.  
  8.   $docbook = $document->getAsDocbook();
  9.   echo $docbook->save();

For the conversion back from docbook to wiki markup, currently only one converter to creole markup has been implemented. This conversion can be used like:

  1.   $docbook = new ezcDocumentDocbook();
  2.   $docbook->loadFile( 'docbook.xml' );
  3.  
  4.   $document = new ezcDocumentCreoleWiki();
  5.   $document->createFromDocbook( $docbook );
  6.   echo $document->save();

Source for this file: /Document/src/document/wiki/creole.php

ezcDocument
   |
   --ezcDocumentWiki
      |
      --ezcDocumentCreoleWiki
Version:   //autogen//

Inherited Member Variables

From ezcDocumentWiki
protected ezcDocumentWiki::$ast
protected ezcDocumentWiki::$contents
protected ezcDocumentWiki::$plugins
From ezcDocument
protected ezcDocument::$errors
protected ezcDocument::$options
protected ezcDocument::$path

Inherited Methods

From ezcDocumentWiki
public void ezcDocumentWiki::createFromDocbook()
Create document from docbook document
public ezcDocumentDocbook ezcDocumentWiki::getAsDocbook()
Return document compiled to the docbook format
public string ezcDocumentWiki::getPluginHandler()
Get plugin handler
public void ezcDocumentWiki::loadString()
Create document from input string
public void ezcDocumentWiki::registerPlugin()
Register plugin handler
public string ezcDocumentWiki::save()
Return document as string
public mixed ezcDocumentWiki::validateFile()
Validate the input file
public mixed ezcDocumentWiki::validateString()
Validate the input string
From ezcDocument
public ezcDocument ezcDocument::__construct()
Construct new document
public abstract void ezcDocument::createFromDocbook()
Create document from docbook document
public abstract ezcDocumentDocbook ezcDocument::getAsDocbook()
Return document compiled to the docbook format
public array ezcDocument::getErrors()
Return list of errors occured during visiting the document.
public string ezcDocument::getPath()
Get document base path
public void ezcDocument::loadFile()
Create document from file
public abstract void ezcDocument::loadString()
Create document from input string
public abstract string ezcDocument::save()
Return document as string
public void ezcDocument::setPath()
Set document base path
public void ezcDocument::triggerError()
Trigger visitor error
Documentation generated by phpDocumentor 1.4.3