PHP » Quellcode betrachten

Download

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

class xml_date implements xml_widget
{
    public 
$node;
    public 
$xml ;

    function 
__construct($node$xml)
    {
        
$this->node $node;
        
$this->xml  $xml ;
    }

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

    public  function 
output($returntype "xhtml")
    {
        
$parse      $this->xml->parseNode($this->nodeTrueTrueTrue, array("format"));
        return 
date(($parse["attributes_array"]["format"] == "") ? "Y-m-d" $parse["attributes_array"]["format"], ($this->node->childNodes->length) ? (int)trim($parse["content_string"]) : date("U"));
    }
}
?>

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