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

Source for file Writer.php

Documentation is available at Writer.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP versions 4 and 5                                                 |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1998-2006 Manuel Lemos, Tomas V.V.Cox,                 |
  6. // | Stig. S. Bakken, Lukas Smith                                         |
  7. // | All rights reserved.                                                 |
  8. // +----------------------------------------------------------------------+
  9. // | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
  10. // | API as well as database abstraction for PHP applications.            |
  11. // | This LICENSE is in the BSD license style.                            |
  12. // |                                                                      |
  13. // | Redistribution and use in source and binary forms, with or without   |
  14. // | modification, are permitted provided that the following conditions   |
  15. // | are met:                                                             |
  16. // |                                                                      |
  17. // | Redistributions of source code must retain the above copyright       |
  18. // | notice, this list of conditions and the following disclaimer.        |
  19. // |                                                                      |
  20. // | Redistributions in binary form must reproduce the above copyright    |
  21. // | notice, this list of conditions and the following disclaimer in the  |
  22. // | documentation and/or other materials provided with the distribution. |
  23. // |                                                                      |
  24. // | Neither the name of Manuel Lemos, Tomas V.V.Cox, Stig. S. Bakken,    |
  25. // | Lukas Smith nor the names of his contributors may be used to endorse |
  26. // | or promote products derived from this software without specific prior|
  27. // | written permission.                                                  |
  28. // |                                                                      |
  29. // | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  |
  30. // | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT    |
  31. // | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS    |
  32. // | FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE      |
  33. // | REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,          |
  34. // | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
  35. // | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS|
  36. // |  OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED  |
  37. // | AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT          |
  38. // | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY|
  39. // | WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE          |
  40. // | POSSIBILITY OF SUCH DAMAGE.                                          |
  41. // +----------------------------------------------------------------------+
  42. // | Author: Lukas Smith <smith@pooteeweet.org>                           |
  43. // +----------------------------------------------------------------------+
  44. //
  45. // $Id: Writer.php,v 1.37 2007/08/19 05:03:43 ifeghali Exp $
  46. //
  47.  
  48. /**
  49.  * Writes an XML schema file
  50.  *
  51.  * @package MDB2_Schema
  52.  * @category Database
  53.  * @access protected
  54.  * @author  Lukas Smith <smith@pooteeweet.org>
  55.  */
  56. {
  57.     // {{{ properties
  58.  
  59.     var $valid_types = array();
  60.  
  61.     // }}}
  62.     // {{{ constructor
  63.  
  64.     function __construct($valid_types = array())
  65.     {
  66.         $this->valid_types = $valid_types;
  67.     }
  68.  
  69.     function MDB2_Schema_Writer($valid_types = array())
  70.     {
  71.         $this->__construct($valid_types);
  72.     }
  73.  
  74.     // }}}
  75.     // {{{ raiseError()
  76.  
  77.     /**
  78.      * This method is used to communicate an error and invoke error
  79.      * callbacks etc.  Basically a wrapper for PEAR::raiseError
  80.      * without the message string.
  81.      *
  82.      * @param int|PEAR_Error integer error code or and PEAR_Error instance
  83.      * @param int      error mode, see PEAR_Error docs
  84.      *
  85.      *                  error level (E_USER_NOTICE etc).  If error mode is
  86.      *                  PEAR_ERROR_CALLBACK, this is the callback function,
  87.      *                  either as a function name, or as an array of an
  88.      *                  object and method name.  For other error modes this
  89.      *                  parameter is ignored.
  90.      * @param string   Extra debug information.  Defaults to the last
  91.      *                  query and native error code.
  92.      * @return object  PEAR error object
  93.      * @access  public
  94.      * @see PEAR_Error
  95.      */
  96.     function &raiseError($code = null$mode = null$options = null$userinfo = null)
  97.     {
  98.         $error =MDB2_Schema::raiseError($code$mode$options$userinfo);
  99.         return $error;
  100.     }
  101.  
  102.     // }}}
  103.     // {{{ _escapeSpecialChars()
  104.  
  105.     /**
  106.      * add escapecharacters to all special characters in a string
  107.      *
  108.      * @param string string that should be escaped
  109.      * @return string escaped string
  110.      * @access protected
  111.      */
  112.     function _escapeSpecialChars($string)
  113.     {
  114.         if (!is_string($string)) {
  115.             $string strval($string);
  116.         }
  117.  
  118.         $escaped '';
  119.         for ($char = 0$count strlen($string)$char $count$char++{
  120.             switch ($string[$char]{
  121.             case '&':
  122.                 $escaped.= '&amp;';
  123.                 break;
  124.             case '>':
  125.                 $escaped.= '&gt;';
  126.                 break;
  127.             case '<':
  128.                 $escaped.= '&lt;';
  129.                 break;
  130.             case '"':
  131.                 $escaped.= '&quot;';
  132.                 break;
  133.             case '\'':
  134.                 $escaped.= '&apos;';
  135.                 break;
  136.             default:
  137.                 $code ord($string[$char]);
  138.                 if ($code < 32 || $code > 127{
  139.                     $escaped.= "&#$code;";
  140.                 else {
  141.                     $escaped.= $string[$char];
  142.                 }
  143.                 break;
  144.             }
  145.         }
  146.         return $escaped;
  147.     }
  148.  
  149.     // }}}
  150.     // {{{ _dumpBoolean()
  151.  
  152.     /**
  153.      * dump the structure of a sequence
  154.      *
  155.      * @param string boolean value or variable definition
  156.      * @return string with xml boolea definition
  157.      * @access private
  158.      */
  159.     function _dumpBoolean($boolean)
  160.     {
  161.         if (is_string($boolean)) {
  162.             if ($boolean !== 'true' || $boolean !== 'false'
  163.                 || preg_match('/<variable>.*</variable>/'$boolean)
  164.             {
  165.                 return $boolean;
  166.             }
  167.         }
  168.         return $boolean 'true' 'false';
  169.     }
  170.  
  171.     // }}}
  172.     // {{{ dumpSequence()
  173.  
  174.     /**
  175.      * dump the structure of a sequence
  176.      *
  177.      * @param string sequence name
  178.      * @param string end of line characters
  179.      * @return mixed string xml sequence definition on success, or a error object
  180.      * @access public
  181.      */
  182.     function dumpSequence($sequence_definition$sequence_name$eol$dump = MDB2_SCHEMA_DUMP_ALL)
  183.     {
  184.         $buffer = "$eol <sequence>$eol  <name>$sequence_name</name>$eol";
  185.         if ($dump == MDB2_SCHEMA_DUMP_ALL || $dump == MDB2_SCHEMA_DUMP_CONTENT{
  186.             if (!empty($sequence_definition['start'])) {
  187.                 $start $sequence_definition['start'];
  188.                 $buffer.= "  <start>$start</start>$eol";
  189.             }
  190.         }
  191.  
  192.         if (!empty($sequence_definition['on'])) {
  193.             $buffer.= "  <on>$eol";
  194.             $buffer.= "   <table>".$sequence_definition['on']['table'];
  195.             $buffer.= "</table>$eol   <field>".$sequence_definition['on']['field'];
  196.             $buffer.= "</field>$eol  </on>$eol";
  197.         }
  198.         $buffer.= " </sequence>$eol";
  199.  
  200.         return $buffer;
  201.     }
  202.  
  203.     // }}}
  204.     // {{{ dumpDatabase()
  205.  
  206.     /**
  207.      * Dump a previously parsed database structure in the Metabase schema
  208.      * XML based format suitable for the Metabase parser. This function
  209.      * may optionally dump the database definition with initialization
  210.      * commands that specify the data that is currently present in the tables.
  211.      *
  212.      * @param array associative array that takes pairs of tag
  213.      *               names and values that define dump options.
  214.      *                  array (
  215.      *                      'output_mode'    =>    String
  216.      *                          'file' :   dump into a file
  217.      *                          default:   dump using a function
  218.      *                      'output'        =>    String
  219.      *                          depending on the 'Output_Mode'
  220.      *                                   name of the file
  221.      *                                   name of the function
  222.      *                      'end_of_line'        =>    String
  223.      *                          end of line delimiter that should be used
  224.      *                          default: "\n"
  225.      *                  );
  226.      * @param integer determines what data to dump
  227.      *                       MDB2_SCHEMA_DUMP_ALL       : the entire db
  228.      *                       MDB2_SCHEMA_DUMP_STRUCTURE : only the structure of the db
  229.      *                       MDB2_SCHEMA_DUMP_CONTENT   : only the content of the db
  230.      * @return mixed MDB2_OK on success, or a error object
  231.      * @access public
  232.      */
  233.     function dumpDatabase($database_definition$arguments$dump = MDB2_SCHEMA_DUMP_ALL)
  234.     {
  235.         if (!empty($arguments['output'])) {
  236.             if (!empty($arguments['output_mode']&& $arguments['output_mode'== 'file'{
  237.                 $fp fopen($arguments['output']'w');
  238.                 if ($fp === false{
  239.                     return $this->raiseError(MDB2_SCHEMA_ERROR_WRITERnullnull,
  240.                         'it was not possible to open output file');
  241.                 }
  242.  
  243.                 $output = false;
  244.             elseif (is_callable($arguments['output'])) {
  245.                 $output $arguments['output'];
  246.             else {
  247.                 return $this->raiseError(MDB2_SCHEMA_ERROR_WRITERnullnull,
  248.                     'no valid output function specified');
  249.             }
  250.         else {
  251.             return $this->raiseError(MDB2_SCHEMA_ERROR_WRITERnullnull,
  252.                 'no output method specified');
  253.         }
  254.  
  255.         $eol = isset($arguments['end_of_line']$arguments['end_of_line'"\n";
  256.  
  257.         $sequences = array();
  258.         if (!empty($database_definition['sequences'])
  259.             && is_array($database_definition['sequences'])
  260.         {
  261.             foreach ($database_definition['sequences'as $sequence_name => $sequence{
  262.                 $table !empty($sequence['on']$sequence['on']['table':'';
  263.                 $sequences[$table][$sequence_name;
  264.             }
  265.         }
  266.  
  267.         $buffer '<?xml version="1.0" encoding="ISO-8859-1" ?>'.$eol;
  268.         $buffer.= "<database>$eol$eol <name>".$database_definition['name']."</name>";
  269.         $buffer.= "$eol <create>".$this->_dumpBoolean($database_definition['create'])."</create>";
  270.         $buffer.= "$eol <overwrite>".$this->_dumpBoolean($database_definition['overwrite'])."</overwrite>$eol";
  271.  
  272.         if ($output{
  273.             call_user_func($output$buffer);
  274.         else {
  275.             fwrite($fp$buffer);
  276.         }
  277.  
  278.         if (!empty($database_definition['tables']&& is_array($database_definition['tables'])) {
  279.             foreach ($database_definition['tables'as $table_name => $table{
  280.                 $buffer = "$eol <table>$eol$eol  <name>$table_name</name>$eol";
  281.                 if ($dump == MDB2_SCHEMA_DUMP_ALL || $dump == MDB2_SCHEMA_DUMP_STRUCTURE{
  282.                     $buffer.= "$eol  <declaration>$eol";
  283.                     if (!empty($table['fields']&& is_array($table['fields'])) {
  284.                         foreach ($table['fields'as $field_name => $field{
  285.                             if (empty($field['type'])) {
  286.                                 return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATEnullnull,
  287.                                     'it was not specified the type of the field "'.
  288.                                     $field_name.'" of the table "'.$table_name.'"');
  289.                             }
  290.                             if (!empty($this->valid_types&& !array_key_exists($field['type']$this->valid_types)) {
  291.                                 return $this->raiseError(MDB2_SCHEMA_ERROR_UNSUPPORTEDnullnull,
  292.                                     'type "'.$field['type'].'" is not yet supported');
  293.                             }
  294.                             $buffer.= "$eol   <field>$eol    <name>$field_name</name>$eol    <type>";
  295.                             $buffer.= $field['type']."</type>$eol";
  296.                             if (!empty($field['fixed']&& $field['type'=== 'text'{
  297.                                 $buffer.= "    <fixed>".$this->_dumpBoolean($field['fixed'])."</fixed>$eol";
  298.                             }
  299.                             if (array_key_exists('default'$field)
  300.                                 && $field['type'!== 'clob' && $field['type'!== 'blob'
  301.                             {
  302.                                 $buffer.= '    <default>'.$this->_escapeSpecialChars($field['default'])."</default>$eol";
  303.                             }
  304.                             if (!empty($field['notnull'])) {
  305.                                 $buffer.= "    <notnull>".$this->_dumpBoolean($field['notnull'])."</notnull>$eol";
  306.                             else {
  307.                                 $buffer.= "    <notnull>false</notnull>$eol";
  308.                             }
  309.                             if (!empty($field['autoincrement'])) {
  310.                                 $buffer.= "    <autoincrement>" $field['autoincrement'."</autoincrement>$eol";
  311.                             }
  312.                             if (!empty($field['unsigned'])) {
  313.                                 $buffer.= "    <unsigned>".$this->_dumpBoolean($field['unsigned'])."</unsigned>$eol";
  314.                             }
  315.                             if (!empty($field['length'])) {
  316.                                 $buffer.= '    <length>'.$field['length']."</length>$eol";
  317.                             }
  318.                             $buffer.= "   </field>$eol";
  319.                         }
  320.                     }
  321.  
  322.                     if (!empty($table['indexes']&& is_array($table['indexes'])) {
  323.                         foreach ($table['indexes'as $index_name => $index{
  324.                             if (strtolower($index_name=== 'primary'{
  325.                                 $index_name $table_name '_pKey';
  326.                             }
  327.                             $buffer.= "$eol   <index>$eol    <name>$index_name</name>$eol";
  328.                             if (!empty($index['unique'])) {
  329.                                 $buffer.= "    <unique>".$this->_dumpBoolean($index['unique'])."</unique>$eol";
  330.                             }
  331.  
  332.                             if (!empty($index['primary'])) {
  333.                                 $buffer.= "    <primary>".$this->_dumpBoolean($index['primary'])."</primary>$eol";
  334.                             }
  335.  
  336.                             foreach ($index['fields'as $field_name => $field{
  337.                                 $buffer.= "    <field>$eol     <name>$field_name</name>$eol";
  338.                                 if (!empty($field&& is_array($field)) {
  339.                                     $buffer.= '     <sorting>'.$field['sorting']."</sorting>$eol";
  340.                                 }
  341.                                 $buffer.= "    </field>$eol";
  342.                             }
  343.                             $buffer.= "   </index>$eol";
  344.                         }
  345.                     }
  346.  
  347.                     if (!empty($table['constraints']&& is_array($table['constraints'])) {
  348.                         foreach ($table['constraints'as $constraint_name => $constraint{
  349.                             $buffer.= "$eol   <foreign>$eol    <name>$constraint_name</name>$eol";
  350.                             if (empty($constraint['fields']|| !is_array($constraint['fields'])) {
  351.                                 return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATEnullnull,
  352.                                     'it was not specified a field for the foreign key "'.
  353.                                     $constraint_name.'" of the table "'.$table_name.'"');
  354.                             }
  355.                             if (!is_array($constraint['references']|| empty($constraint['references']['table'])) {
  356.                                 return $this->raiseError(MDB2_SCHEMA_ERROR_VALIDATEnullnull,
  357.                                     'it was not specified the referenced table of the foreign key "'.
  358.                                     $constraint_name.'" of the table "'.$table_name.'"');
  359.                             }
  360.                             if (!empty($constraint['match'])) {
  361.                                 $buffer.= "    <match>".$constraint['match']."</match>$eol";
  362.                             }
  363.                             if (!empty($constraint['ondelete'])) {
  364.                                 $buffer.= "    <ondelete>".$constraint['ondelete']."</ondelete>$eol";
  365.                             }
  366.                             if (!empty($constraint['onupdate'])) {
  367.                                 $buffer.= "    <onupdate>".$constraint['onupdate']."</onupdate>$eol";
  368.                             }
  369.                             if (!empty($constraint['deferrable'])) {
  370.                                 $buffer.= "    <deferrable>".$constraint['deferrable']."</deferrable>$eol";
  371.                             }
  372.                             if (!empty($constraint['initiallydeferred'])) {
  373.                                 $buffer.= "    <initiallydeferred>".$constraint['initiallydeferred']."</initiallydeferred>$eol";
  374.                             }
  375.                             foreach ($constraint['fields'as $field_name => $field{
  376.                                 $buffer.= "    <field>$field_name</field>$eol";
  377.                             }
  378.                             $buffer.= "    <references>$eol     <table>".$constraint['references']['table']."</table>$eol";
  379.                             foreach ($constraint['references']['fields'as $field_name => $field{
  380.                                 $buffer.= "     <field>$field_name</field>$eol";
  381.                             }
  382.                             $buffer.= "    </references>$eol";
  383.  
  384.                             $buffer.= "   </foreign>$eol";
  385.                         }
  386.                     }
  387.  
  388.                     $buffer.= "$eol  </declaration>$eol";
  389.                 }
  390.  
  391.                 if ($output{
  392.                     call_user_func($output$buffer);
  393.                 else {
  394.                     fwrite($fp$buffer);
  395.                 }
  396.  
  397.                 $buffer '';
  398.                 if ($dump == MDB2_SCHEMA_DUMP_ALL || $dump == MDB2_SCHEMA_DUMP_CONTENT{
  399.                     if (!empty($table['initialization']&& is_array($table['initialization'])) {
  400.                         $buffer = "$eol  <initialization>$eol";
  401.                         foreach ($table['initialization'as $instruction{
  402.                             switch ($instruction['type']{
  403.                             case 'insert':
  404.                                 $buffer.= "$eol   <insert>$eol";
  405.                                 foreach ($instruction['data']['field'as $field{
  406.                                     $field_name $field['name'];
  407.                                     $buffer.= "$eol    <field>$eol     <name>$field_name</name>$eol";
  408.                                     $buffer.= $this->writeExpression($field['group']5$arguments);
  409.                                     $buffer.= "    </field>$eol";
  410.                                 }
  411.                                 $buffer.= "$eol   </insert>$eol";
  412.                                 break;
  413.                             case 'update':
  414.                                 $buffer.= "$eol   <update>$eol";
  415.                                 foreach ($instruction['data']['field'as $field{
  416.                                     $field_name $field['name'];
  417.                                     $buffer.= "$eol    <field>$eol     <name>$field_name</name>$eol";
  418.                                     $buffer.= $this->writeExpression($field['group']5$arguments);
  419.                                     $buffer.= "    </field>$eol";
  420.                                 }
  421.  
  422.                                 if (!empty($instruction['data']['where'])
  423.                                     && is_array($instruction['data']['where'])
  424.                                 {
  425.                                     $buffer.= "    <where>$eol";
  426.                                     $buffer.= $this->writeExpression($instruction['data']['where']5$arguments);
  427.                                     $buffer.= "    </where>$eol";
  428.                                 }
  429.  
  430.                                 $buffer.= "$eol   </update>$eol";
  431.                                 break;
  432.                             case 'delete':
  433.                                 $buffer.= "$eol   <delete>$eol$eol";
  434.                                 if (!empty($instruction['data']['where'])
  435.                                     && is_array($instruction['data']['where'])
  436.                                 {
  437.                                     $buffer.= "    <where>$eol";
  438.                                     $buffer.= $this->writeExpression($instruction['data']['where']5$arguments);
  439.                                     $buffer.= "    </where>$eol";
  440.                                 }
  441.                                 $buffer.= "$eol   </delete>$eol";
  442.                                 break;
  443.                             }
  444.                         }
  445.                         $buffer.= "$eol  </initialization>$eol";
  446.                     }
  447.                 }
  448.                 $buffer.= "$eol </table>$eol";
  449.                 if ($output{
  450.                     call_user_func($output$buffer);
  451.                 else {
  452.                     fwrite($fp$buffer);
  453.                 }
  454.  
  455.                 if (isset($sequences[$table_name])) {
  456.                     foreach ($sequences[$table_nameas $sequence{
  457.                         $result $this->dumpSequence(
  458.                             $database_definition['sequences'][$sequence],
  459.                             $sequence$eol$dump
  460.                         );
  461.                         if (PEAR::isError($result)) {
  462.                             return $result;
  463.                         }
  464.  
  465.                         if ($output{
  466.                             call_user_func($output$result);
  467.                         else {
  468.                             fwrite($fp$result);
  469.                         }
  470.                     }
  471.                 }
  472.             }
  473.         }
  474.  
  475.         if (isset($sequences[''])) {
  476.             foreach ($sequences[''as $sequence{
  477.                 $result $this->dumpSequence(
  478.                     $database_definition['sequences'][$sequence],
  479.                     $sequence$eol$dump
  480.                 );
  481.                 if (PEAR::isError($result)) {
  482.                     return $result;
  483.                 }
  484.  
  485.                 if ($output{
  486.                     call_user_func($output$result);
  487.                 else {
  488.                     fwrite($fp$result);
  489.                 }
  490.             }
  491.         }
  492.  
  493.         $buffer = "$eol</database>$eol";
  494.         if ($output{
  495.             call_user_func($output$buffer);
  496.         else {
  497.             fwrite($fp$buffer);
  498.             fclose($fp);
  499.         }
  500.  
  501.         return MDB2_OK;
  502.     }
  503.  
  504.     // }}}
  505.     // {{{ writeExpression()
  506.  
  507.     /**
  508.      * Dumps the structure of an element. Elements can be value, column,
  509.      * function or expression.
  510.      *
  511.      * @param array  multi dimensional array that represents the parsed element
  512.      *                 of a DML instruction.
  513.      * @param integer  base indentation width
  514.      * @param array  associative array that takes pairs of tag
  515.      *                 names and values that define dump options.
  516.      *
  517.      * @return string 
  518.      *
  519.      * @access public
  520.      * @see MDB2_Schema_Writer::dumpDatabase()
  521.      */
  522.     function writeExpression($element$offset = 0$arguments = null)
  523.     {
  524.         $eol = isset($arguments['end_of_line']$arguments['end_of_line'"\n";
  525.         $str '';
  526.         $indent str_repeat(' '$offset);
  527.         $noffset $offset + 1;
  528.  
  529.         switch ($element['type']{
  530.             case 'value':
  531.                 $str.= "$indent<value>".$this->_escapeSpecialChars($element['data'])."</value>$eol";
  532.             break;
  533.             case 'column':
  534.                 $str.= "$indent<column>".$this->_escapeSpecialChars($element['data'])."</column>$eol";
  535.             break;
  536.             case 'function':
  537.                 $str.= "$indent<function>$eol$indent <name>".$this->_escapeSpecialChars($element['data']['name'])."</name>$eol";
  538.  
  539.                 if (!empty($element['data']['arguments'])
  540.                     && is_array($element['data']['arguments'])
  541.                 {
  542.                     foreach ($element['data']['arguments'as $v{
  543.                         $str.= $this->writeExpression($v$noffset$arguments);
  544.                     }
  545.                 }
  546.  
  547.                 $str.= "$indent</function>$eol";
  548.             break;
  549.             case 'expression':
  550.                 $str.= "$indent<expression>$eol";
  551.                 $str.= $this->writeExpression($element['data']['operants'][0]$noffset$arguments);
  552.                 $str.= "$indent <operator>".$element['data']['operator']."</operator>$eol";
  553.                 $str.= $this->writeExpression($element['data']['operants'][1]$noffset$arguments);
  554.                 $str.= "$indent</expression>$eol";
  555.             break;
  556.         }
  557.         return $str;
  558.     }
  559.  
  560.     // }}}
  561. }
  562. ?>

Documentation generated on Mon, 11 Mar 2019 14:44:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.