Changeset 1540
- Timestamp:
- 04/12/08 20:13:04 (1 month ago)
- Files:
-
- trunk/examples/docroot/core/exception.php (modified) (1 diff)
- trunk/examples/docroot/json-rpc/index.php (modified) (1 diff)
- trunk/examples/docroot/logging/index.php (modified) (3 diffs)
- trunk/examples/docroot/request/broker.php (modified) (4 diffs)
- trunk/examples/docroot/variants/variants.php (modified) (2 diffs)
- trunk/examples/docroot/websites-xml/index.php (modified) (1 diff)
- trunk/src/main/php/org/stubbles/examples/pageelements/Shop.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/examples/docroot/core/exception.php
r1234 r1540 3 3 stubClassLoader::load('net::stubbles::lang::errorhandler::stubProdModeExceptionHandler', 4 4 'net::stubbles::lang::errorhandler::stubDisplayExceptionHandler', 5 'net::stubbles:: util::stubRegistry'5 'net::stubbles::lang::stubRegistry' 6 6 ); 7 7 class Bootstrap trunk/examples/docroot/json-rpc/index.php
r1379 r1540 16 16 17 17 stubClassLoader::load('net::stubbles::ipo::request::stubWebRequest', 18 'net::stubbles::ipo::session::stubPHPSession'); 18 'net::stubbles::ipo::response::stubBaseResponse', 19 'net::stubbles::ipo::session::stubPHPSession' 20 ); 19 21 20 22 $request = new stubWebRequest(); 21 $session = new stubPHPSession($request, session_name());23 $session = new stubPHPSession($request, new stubBaseResponse(), session_name()); 22 24 23 25 $propFile = '../../examples.properties'; trunk/examples/docroot/logging/index.php
r1234 r1540 7 7 'net::stubbles::ipo::session::stubPHPSession', 8 8 'net::stubbles::util::log::log', 9 'net::stubbles::util::log::stubLoggerXJConf Factory');9 'net::stubbles::util::log::stubLoggerXJConfInitializer'); 10 10 class Bootstrap 11 11 { … … 13 13 { 14 14 // initialize logger from configuration 15 // in a default application using the 16 // net.stubbles.websites.stubFrontController this can be done via the 17 // net.stubbles.util.log.stubLogPreInterceptor 18 $loggerXJConfFactory = new stubLoggerXJConfFactory(); 19 $loggerXJConfFactory->init(); 15 $loggerXJConfInitializer = new stubLoggerXJConfInitializer(); 16 $loggerXJConfInitializer->init(); 20 17 21 18 // now the real work for logging … … 25 22 // config/xml/config.xml with the property net.stubbles.util.log.class 26 23 // if property not set an instance of 27 // net .stubbles.util.log.stubBaseLogData will be created24 // net::stubbles::util::log::stubBaseLogData will be created 28 25 $logData = stubLogDataFactory::create('trail', stubLogger::LEVEL_INFO); 29 26 trunk/examples/docroot/request/broker.php
r1234 r1540 12 12 stubClassLoader::load('net::stubbles::ipo::request::stubWebRequest', 13 13 'net::stubbles::ipo::request::broker::stubRequestBroker', 14 'net::stubbles::ipo::request::filters::stub HtmlOutputFilter'14 'net::stubbles::ipo::request::filters::stubFilterFactory' 15 15 ); 16 16 /** … … 61 61 public static function main() 62 62 { 63 $htmlFilter = new stubHtmlOutputFilter();64 63 $simplePopo = new SimplePopo(); 65 64 $request = new stubWebRequest(); … … 78 77 } 79 78 80 echo '<label for="foo">Enter an integer value between 2 and 4:</label> <input type="text" id="foo" name="foo" value="' . $request->getFilteredValue( $htmlFilter, 'foo') . '"/><br/>' . "\n";79 echo '<label for="foo">Enter an integer value between 2 and 4:</label> <input type="text" id="foo" name="foo" value="' . $request->getFilteredValue(stubFilterFactory::forType('string'), 'foo') . '"/><br/>' . "\n"; 81 80 if ($request->hasValueError('bar') == true) { 82 81 foreach ($request->getValueError('bar') as $valueError) { … … 85 84 } 86 85 87 echo '<label for="bar">Enter any string with at least 5 characters:</label> <input type="text" id="bar" name="bar" value="' . $request->getFilteredValue($htmlFilter, 'bar') . '" /><br/>' . "\n";86 echo '<label for="bar">Enter any string with at least 5 characters:</label> <input type="text" id="bar" name="bar" value="' . $request->getFilteredValue(stubFilterFactory::forType('string'), 'bar') . '" /><br/>' . "\n"; 88 87 echo '<input type="submit" name="action" value="Send"></form><br/><br/>' . "\n"; 89 88 echo 'The SimplePopo class contents:<br/><pre>'; trunk/examples/docroot/variants/variants.php
r1234 r1540 11 11 stubClassLoader::load('net::stubbles::websites::variantmanager::stubVariantXJConfFactory', 12 12 'net::stubbles::ipo::request::stubWebRequest', 13 'net::stubbles::ipo::response::stubBaseResponse', 13 14 'net::stubbles::ipo::session::stubPHPSession' 14 15 ); … … 19 20 $factory = new stubVariantXJConfFactory(stubConfig::getConfigPath() . '/xml/variantmanager.xml'); 20 21 $request = new stubWebRequest(); 21 $session = new stubPHPSession($request, 'web');22 $session = new stubPHPSession($request, new stubBaseResponse(), 'web'); 22 23 echo '<pre>'; 23 24 var_dump($factory->getVariantsMap()->getVariant($session, $request)->getFullQualifiedName()); trunk/examples/docroot/websites-xml/index.php
r1431 r1540 13 13 require '../bootstrap-stubbles.php'; 14 14 15 stubClassLoader::load('net::stubbles:: util::stubGeneralInitializer',15 stubClassLoader::load('net::stubbles::lang::initializer::stubGeneralInitializer', 16 16 'net::stubbles::websites::stubDefaultWebsiteInitializer', 17 17 'net::stubbles::websites::stubFrontController' trunk/src/main/php/org/stubbles/examples/pageelements/Shop.php
r1402 r1540 7 7 * @subpackage pageelements 8 8 */ 9 stubClassLoader::load('net::stubbles:: util::net::http::stubHTTPURL',9 stubClassLoader::load('net::stubbles::peer::http::stubHTTPURL', 10 10 'net::stubbles::lang::exceptions::stubIllegalArgumentException' 11 11 );
