/[cvs]/nfo/php/libs/org.netfrag.flib/Site/Loader.php
ViewVC logotype

Contents of /nfo/php/libs/org.netfrag.flib/Site/Loader.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Tue Nov 12 05:42:31 2002 UTC (21 years, 10 months ago) by joko
Branch: MAIN
+ initial checkin

1 <?
2 // -------------------------------------------------------------------------
3 // $Id$
4 // -------------------------------------------------------------------------
5 // $Log$
6 // -------------------------------------------------------------------------
7
8
9 class Site_Loader {
10
11 var $site;
12
13 function includeFile($filename) {
14
15 // TODO: try to remove these globals!
16 global $site_state;
17 global $uservars;
18 global $request;
19
20 $this->site->log( get_class($this) . "->includeFile( filename $filename )", LOG_DEBUG);
21 $site = &$this->site;
22 include($filename);
23 }
24
25 function loadComponent($name, $type = "") {
26 $prefix = "";
27 $postfix = "";
28 $this->site->log( get_class($this) . "->loadComponent( name $name, type $type )", LOG_DEBUG);
29 switch ($type) {
30 case "handler":
31 $prefix = $this->site->config[path][base] . 'core/handler/';
32 $postfix = ".handler.php";
33 break;
34 case "page":
35 $prefix = $this->site->config[path][base] . 'core/pages/';
36 $postfix = ".page";
37 break;
38 }
39 $includefile = "$prefix$name$postfix";
40 $this->includeFile($includefile);
41 }
42
43 function loadHandler($name) {
44 $this->site->log( get_class($this) . "->loadHandler( name $name )", LOG_DEBUG);
45 $this->loadComponent($name, "handler");
46 }
47
48 function loadPage($name) {
49 $this->site->log( get_class($this) . "->loadPage( name $name )", LOG_DEBUG);
50 $this->loadComponent($name, "page");
51 }
52
53
54 function loadClass() {
55 }
56
57 function loadBusinessClass() {
58 }
59
60
61
62 }
63 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed