XML_Transformer
[ class tree: XML_Transformer ] [ index: XML_Transformer ] [ all elements ]

Class: XML_Transformer_Driver_OutputBuffer

Source Location: /XML_Transformer-1.1.2/XML/Transformer/Driver/OutputBuffer.php

Class Overview

XML_Transformer
   |
   --XML_Transformer_Driver_OutputBuffer

Uses PHP's Output Buffering mechanism to catch the output of a script, transforms it, and outputs the result.


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: XML_Transformer

XML_Transformer::XML_Transformer()
Constructor.
XML_Transformer::canonicalize()
Canonicalizes a given attributes array or element name.
XML_Transformer::isOverloadedNamespace()
Returns TRUE if a given namespace is overloaded, FALSE otherwise.
XML_Transformer::overloadNamespace()
Overloads an XML Namespace.
XML_Transformer::sendMessage()
Sends a message to a given target.
XML_Transformer::setCaseFolding()
Sets the XML parser's case-folding option.
XML_Transformer::setCollapsingOfEmptyTags()
Sets the collapsing of empty tags.
XML_Transformer::setDebug()
Enables or disables debugging information.
XML_Transformer::setLogTarget()
Sets the target to which error messages and debugging messages are sent.
XML_Transformer::setRecursiveOperation()
Enables or disables the recursive operation.
XML_Transformer::stackdump()
Returns a stack dump as a debugging aid.
XML_Transformer::transform()
Transforms a given XML string using the registered PHP callbacks for overloaded tags.
XML_Transformer::unOverloadNamespace()
Reverts overloading of a given XML Namespace.

Class Details

[line 67]
Uses PHP's Output Buffering mechanism to catch the output of a script, transforms it, and outputs the result.

Example

  1.  <?php
  2.  require_once 'XML/Transformer/Driver/OutputBuffer.php';
  3.  require_once 'XML/Transformer/Namespace.php';
  4.  
  5.  class Main extends XML_Transformer_Namespace {
  6.      function start_bold($attributes{
  7.          return '<b>';
  8.      }
  9.  
  10.      function end_bold($cdata{
  11.          return $cdata '</b>';
  12.      }
  13.  }
  14.  
  15.    array(
  16.      'overloadedNamespaces' => array(
  17.        '&MAIN' => new Main
  18.      )
  19.    )
  20.  );
  21.  ?>
  22.  <bold>text</bold>

Output

  1.  <b>text</b>



[ Top ]


Method Detail

XML_Transformer_Driver_OutputBuffer (Constructor)   [line 85]

XML_Transformer_Driver_OutputBuffer XML_Transformer_Driver_OutputBuffer( [array $parameters = array()])

Constructor.
  • Access: public

Parameters:

array   $parameters   — 

[ Top ]

start   [line 102]

void start( )

Starts the output-buffering, and thus the transformation.
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.