Location: PHPKode > projects > PHPTAL > PHPTAL-1.2.2/PHPTAL/Dom/DocumentBuilder.php
<?php
/**
 * PHPTAL templating engine
 *
 * PHP Version 5
 *
 * @category HTML
 * @package  PHPTAL
 * @author   Laurent Bedubourg <hide@address.com>
 * @author   Kornel Lesiński <hide@address.com>
 * @license  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
 * @version  SVN: $Id: DocumentBuilder.php 865 2010-05-25 22:16:24Z kornel $
 * @link     http://phptal.org/
 */

/**
 * DOM Builder
 *
 * @package PHPTAL
 * @subpackage Dom
 */
abstract class PHPTAL_Dom_DocumentBuilder
{
    protected $_stack;   /* array<PHPTAL_Dom_Node> */
    protected $_current; /* PHPTAL_Dom_Node */

    protected $file, $line;

    public function __construct()
    {
        $this->_stack = array();
    }

    abstract public function getResult();

    abstract public function onDocumentStart();

    abstract public function onDocumentEnd();

    abstract public function onDocType($doctype);

    abstract public function onXmlDecl($decl);

    abstract public function onComment($data);

    abstract public function onCDATASection($data);

    abstract public function onProcessingInstruction($data);

    abstract public function onElementStart($element_qname, array $attributes);

    abstract public function onElementData($data);

    abstract public function onElementClose($qname);

    public function setSource($file, $line)
    {
        $this->file = $file; $this->line = $line;
    }

    abstract public function setEncoding($encoding);
}

Return current item: PHPTAL