PHP Classes
Icontem

File: class/xmlmenu.cls.php


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Johan Barbier  >  XML to HTML menu  >  class/xmlmenu.cls.php  
File: class/xmlmenu.cls.php
Role: Class source
Content type: text/plain
Description: xmlmenu factory class
Class: XML to HTML menu
Generate menus in XML and HTML
 

Contents

Class file image Download
<?php
class xmlmenu {

    
private function __construct () {
        
// FORBIDDEN TO CALL THE CONSTRUCTOR ;-)
    
}

    
public static function getInstance ($sVersion null$sEncodingnull) {
        if (!
class_exists ('DOMDocument')) {
            
$sInstance 'xmlmenuhasnone';
        } elseif (!
class_exists ('XSLTProcessor')) {
            
$sInstance 'xmlmenuhasdom';
        } else {
            
$sInstance 'xmlmenuhasboth';
        }
        
//$sInstance = 'xmlmenuhasnone'; // Just to check wether it works without DOM and XSLT :-) Remove the comments if you want to, too.
        
require_once 'class/'.$sInstance.'.cls.php';
        return new 
$sInstance ($sVersion$sEncoding);
    }
}
?>

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products