Changeset 665

Show
Ignore:
Timestamp:
05/08/07 21:28:03 (1 year ago)
Author:
schst
Message:

Moved variant manager example from docroot to examples

Files:

Legend:

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

    r658 r665  
    7171      <li><a href="foreignClassLoaders/">Loading classes from foreign resources with the Stubbles class loader</a></li> 
    7272      <li><a href="logging/">Logging data</a></li> 
     73      <li><a href="variants/variants.php">Using variants</a> (<a href="showsource.php?group=variants&example=variants">show PHP source</a>)</li> 
    7374      <li> 
    7475        XML handling 
  • trunk/examples/variants/variants.php

    r524 r665  
    11<?php 
    2 require '../config/php/config.php'; 
    3 require '../lib/stubbles.php'; 
     2/** 
     3 * Example for variants 
     4 * 
     5 * @author  Frank Kleine <mikey@stubbles.net> 
     6 * @author  Stephan Schmidt <schst@stubbles.net> 
     7 * @see     http://www.stubbles.net/wiki/Docs/MVC/Variant 
     8 */ 
     9require '../../config/php/config.php'; 
     10require '../bootstrap-stubbles.php'; 
     11 
    412stubClassLoader::load('net.stubbles.websites.variantmanager.stubVariantXJConfFactory', 
    513                      'net.stubbles.ipo.request.stubWebRequest', 
     
    1018    public static function main() 
    1119    { 
    12         echo '<pre>'; 
    1320        $factory = new stubVariantXJConfFactory(stubConfig::getConfigPath() . '/xml/variantmanager.xml'); 
    1421        $request = new stubWebRequest(); 
    1522        $session = new stubPHPSession($request, 'web'); 
     23        echo '<pre>'; 
    1624        var_dump($factory->getVariantsMap()->getVariant($session, $request)->getFullQualifiedName()); 
     25        echo '</pre>'; 
    1726    } 
    1827}