Changeset 690

Show
Ignore:
Timestamp:
05/29/07 22:16:09 (1 year ago)
Author:
schst
Message:

Added example for the Memphis processor

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/docroot/index.php

    r681 r690  
    8181      <li><a href="variants/variants.php">Using variants</a> (<a href="showsource.php?group=variants&example=variants">show PHP source</a>)</li> 
    8282      <li> 
     83        Processors 
     84        <ul> 
     85          <li> 
     86            <a href="websites-memphis/?processor=page">Memphis processor</a> (<a href="showsource.php?group=websites-memphis&example=index">show PHP source</a>) 
     87          </li> 
     88        </ul> 
     89      </li> 
     90      <li> 
    8391        XML handling 
    8492        <ul> 
  • trunk/examples/docroot/websites-memphis/index.php

    r681 r690  
    11<?php 
    2 require '../config/php/config.php'; 
    3 require '../lib/stubbles.php'; 
    4 stubClassLoader::load('net.stubbles.websites.memphis.stubMemphisProcessor', 
    5                       'net.stubbles.websites.stubPageXJConfFactory', 
    6                       'net.stubbles.ipo.request.stubWebRequest', 
    7                       'net.stubbles.ipo.session.stubPHPSession', 
    8                       'net.stubbles.ipo.response.stubResponse' 
     2/** 
     3 * Example for the Memphis processor 
     4 * 
     5 * @author  Frank Kleine <mikey@stubbles.net> 
     6 * @author  Stephan Schmidt <schst@stubbles.net> 
     7 * @link    http://www.stubbles.net/wiki/Docs/MVC 
     8 */ 
     9 
     10/** 
     11 * Load Stubbles 
     12 */ 
     13require '../bootstrap-stubbles.php'; 
     14 
     15stubClassLoader::load('net.stubbles.websites.stubFrontController', 
     16                      'net.stubbles.ipo.interceptors.stubInterceptorXJConfInitializer', 
     17                      'net.stubbles.websites.processors.stubProcessorResolverXJConfFactory', 
     18                      'net.stubbles.util.stubRegistryXJConfInitializer' 
    919); 
     20 
    1021class Bootstrap 
    1122{ 
    1223    public static function main() 
    13     { 
    14         $request     = new stubWebRequest(); 
    15         $session     = new stubPHPSession($request, 'stubSID'); 
    16         $pageFactory = new stubPageXJConfFactory(stubXJConfLoader::getInstance()); 
    17         $processor   = new stubMemphisProcessor($request, $session, new stubBaseResponse(), $pageFactory); 
    18         $processor->process()->getResponse()->send(); 
     24    { 
     25        $controller = new stubFrontController(new stubRegistryXJConfInitializer(), 
     26                                              new stubInterceptorXJConfInitializer(), 
     27                                              new stubProcessorResolverXJConfFactory()); 
     28        $controller->process(); 
    1929    } 
    2030}