Changeset 680

Show
Ignore:
Timestamp:
05/29/07 20:45:42 (1 year ago)
Author:
schst
Message:

Added separate configuration for examples, so the do not pollute the config folder.
Hope mikey likes this change :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/bootstrap-stubbles.php

    r622 r680  
    11<?php 
     2require dirname(__FILE__) . '/../config-examples/php/config.php'; 
     3 
    24if (file_exists(stubConfig::getLibPath() . DIRECTORY_SEPARATOR . 'stubbles.php') == true) { 
    35    require stubConfig::getLibPath() . DIRECTORY_SEPARATOR . 'stubbles.php'; 
  • trunk/examples/core/error-simple.php

    r673 r680  
    1212 */ 
    1313 
    14 require '../../config/php/config.php'; 
    1514require '../bootstrap-stubbles.php'; 
    1615stubClassLoader::load('net.stubbles.util.errorhandler.stubIllegalArgumentErrorHandler', 
  • trunk/examples/events/index.php

    r631 r680  
    33highlight_file(__FILE__); 
    44 
    5 require '../../config/php/config.php'; 
    65require '../bootstrap-stubbles.php'; 
    76stubClassLoader::load('net.stubbles.events.events', 
     
    1918        $eventDispatcher->register(new BlackList(), 'onLogin'); 
    2019        $eventDispatcher->register(new UserLoginLogging(), 'onLogin'); 
    21          
     20 
    2221        // now we simply authenticate users 
    2322        $auth = new Auth(); 
     
    2625        $auth->login('schst', 'evenmoresecret'); 
    2726        var_dump($auth->isValid()); 
    28          
     27 
    2928        // display logs 
    3029        echo '<br /><br />The logfile:<br />'; 
  • trunk/examples/events/queue.php

    r627 r680  
    22echo 'The PHP code:<br />'; 
    33highlight_file(__FILE__); 
    4 require '../../config/php/config.php'; 
    54require '../bootstrap-stubbles.php'; 
    65stubClassLoader::load('net.stubbles.events.events', 
     
    3938        // get an instance of the event dispatcher 
    4039        $eventDispatcher = stubEventDispatcher::getInstance(); 
    41          
     40 
    4241        $request = new stubWebRequest(); 
    43         // we trigger the event before the listener is registered but the  
    44         // fourth parameter says that the event should be queued and all  
     42        // we trigger the event before the listener is registered but the 
     43        // fourth parameter says that the event should be queued and all 
    4544        // listeners registered for this event subsequently will be notified 
    4645        $eventDispatcher->trigger('onRequestCreated', $request, array(), true); 
    47          
     46 
    4847        // now we register the listener that will be notified instantly 
    4948        $eventDispatcher->register(new ExampleListener(), 'onRequestCreated'); 
  • trunk/examples/foreignClassLoaders/index.php

    r625 r680  
    33highlight_file(__FILE__); 
    44 
    5 require '../../config/php/config.php'; 
    65require '../bootstrap-stubbles.php'; 
    76stubClassLoader::load('net.stubbles.util.ext.stubXPClassLoader'); 
  • trunk/examples/ipc07/csvWriter.php

    r670 r680  
    77 * @uses    stubXMLSerializer 
    88 */ 
    9 require '../../config/php/config.php'; 
    109require '../bootstrap-stubbles.php'; 
    1110stubClassLoader::load('net.stubbles.reflection.reflection'); 
  • trunk/examples/ipc07/xmlSerializer.php

    r670 r680  
    77 * @uses    stubXMLSerializer 
    88 */ 
    9 require '../../config/php/config.php'; 
    109require '../bootstrap-stubbles.php'; 
    1110stubClassLoader::load('net.stubbles.xml.serializer.stubXMLSerializer', 
  • trunk/examples/json-rpc/jsonrpc.php

    r622 r680  
    11<?php 
    2 require '../../config/php/config.php'; 
    32require '../bootstrap-stubbles.php'; 
    43stubClassLoader::load('net.stubbles.websites.processors.stubJsonRpcProcessor', 
  • trunk/examples/logging/index.php

    r626 r680  
    33highlight_file(__FILE__); 
    44 
    5 require '../../config/php/config.php'; 
    65require '../bootstrap-stubbles.php'; 
    76stubClassLoader::load('net.stubbles.ipo.request.stubWebRequest', 
  • trunk/examples/variants/variants.php

    r665 r680  
    77 * @see     http://www.stubbles.net/wiki/Docs/MVC/Variant 
    88 */ 
    9 require '../../config/php/config.php'; 
    109require '../bootstrap-stubbles.php'; 
    1110 
  • trunk/examples/xml/serializer.php

    r660 r680  
    44 * 
    55 * @author  Stephan Schmidt <schst@stubbles.net> 
    6  * @see     http://www.stubbles.net/wiki/Docs/XMLSerializer 
     6 * @link    http://www.stubbles.net/wiki/Docs/XMLSerializer 
    77 * @uses    stubXMLSerializer 
    88 */ 
    9 require '../../config/php/config.php'; 
    109require '../bootstrap-stubbles.php'; 
    1110stubClassLoader::load('net.stubbles.xml.serializer.stubXMLSerializer', 
  • trunk/examples/xml/streamWriter.php

    r656 r680  
    44 * 
    55 * @author  Stephan Schmidt <schst@stubbles.net> 
    6  * @see     http://www.stubbles.net/wiki/Docs/XMLStreamWriter 
     6 * @link    http://www.stubbles.net/wiki/Docs/XMLStreamWriter 
    77 * @uses    stubXMLStreamWriterFactory 
    88 * @uses    stubXMLStreamWriter 
    99 */ 
    10 require '../../config/php/config.php'; 
    1110require '../bootstrap-stubbles.php'; 
    1211stubClassLoader::load('net.stubbles.xml.stubXMLStreamWriterFactory');