Location: PHPKode > scripts > XML Weblication > xml-weblication/lib/module.php
<?

/**
  * Module Class for weblication
  * @author Andreas Altendorfer <hide@address.com>
  * @date 2003-12-08
  */
  
class Module
{

   var      $modname;         // prefix 
   var      $filename;
   var      $functionname;
   
   function Module( $prefix ) {
     $this->modname = $prefix;
	 $this->filename= $cfg["modules"] . "/" . $prefix . ".php";
	 $this->functionname="module_" . $prefix;
   }
   
   function execute() {
     if ( ! function_exists( $this->functionname )) {
		Fatal( "MODULE " . $this->modname . " ERROR ".
		       "FUNCTION ". $this->functionname . " DOES NOT EXISTS" );
	 }
	 else {
	   $f = $this->functionname;
	   return( $f()  );
	 }
   }
  
} //- class Menu

?>
Return current item: XML Weblication