PHP » Quellcode betrachten

Download

<?php
/* xml extension class
 * (C) 2006 Julian von Mendel (http://derjulian.net)
 * License: LGPL
 */

abstract class xmlreplacement implements xml_widget
{
    public 
$node;
    public 
$xml ;
    public 
$data;

    function 
__construct
    
(
        
$node,
        
$xml ,
        
$data = array()
    )
    {
        
$this->node $node;
        
$this->xml  $xml ;
        
$this->data $data;
    }

    public static function 
dtd()
    {
        return <<<DTD
DTD;
    }

    public function 
output($returntype "xhtml")
    {
        
$parse $this->xml->attributes($this->node, array());
        if (
method_exists($this$returntype))
        {
            return 
call_user_func(array($this$returntype), $parse["attributes_string"]);
        }
        return 
False;
    }

    abstract function 
xhtml($attributes);
}

class 
xml_seperator extends xmlreplacement
{
    public function 
xhtml($attributes)
    {
        return 
"<hr".$attributes." />";
    }
}
?>

© 2009 Julian von Mendel (http://derjulian.net) | Datum: 26.04.2024