Changeset 1234

Show
Ignore:
Timestamp:
01/13/08 13:21:37 (7 months ago)
Author:
mikey
Message:

continued refactoring #119: fixed examples
JSON-RPC examples do not work, but they already did not before

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/config/xml/json-rpc-service.xml

    r1219 r1234  
    33    xmlns:xj="http://xjconf.net/XJConf" 
    44    xmlns="http://stubbles.net/service/json-rpc"> 
    5   <service-url>http://localhost/?processor=jsonrpc</service-url> 
    65  <services> 
    76    <service name="MathService" className="org::stubbles::examples::service::MathService"/> 
  • trunk/examples/docroot/core/error-simple.php

    r1093 r1234  
    1313 
    1414require '../bootstrap-stubbles.php'; 
    15 stubClassLoader::load('net.stubbles.lang.errorhandler.stubIllegalArgumentErrorHandler', 
    16                       'net.stubbles.lang.errorhandler.stubCompositeErrorHandler', 
    17                       'net.stubbles.ipo.response.stubBaseResponse' 
     15stubClassLoader::load('net::stubbles::lang::errorhandler::stubIllegalArgumentErrorHandler', 
     16                      'net::stubbles::lang::errorhandler::stubCompositeErrorHandler', 
     17                      'net::stubbles::ipo::response::stubBaseResponse' 
    1818); 
    1919class Bootstrap 
  • trunk/examples/docroot/core/exception.php

    r1093 r1234  
    11<?php 
    22require '../bootstrap-stubbles.php'; 
    3 stubClassLoader::load('net.stubbles.lang.errorhandler.stubProdModeExceptionHandler', 
    4                       'net.stubbles.lang.errorhandler.stubDisplayExceptionHandler', 
    5                       'net.stubbles.util.stubRegistry' 
     3stubClassLoader::load('net::stubbles::lang::errorhandler::stubProdModeExceptionHandler', 
     4                      'net::stubbles::lang::errorhandler::stubDisplayExceptionHandler', 
     5                      'net::stubbles::util::stubRegistry' 
    66); 
    77class Bootstrap 
  • trunk/examples/docroot/events/index.php

    r1156 r1234  
    44 
    55require '../bootstrap-stubbles.php'; 
    6 stubClassLoader::load('net.stubbles.events.events', 
    7                       'org.stubbles.examples.events.Auth', 
    8                       'org.stubbles.examples.events.BlackList', 
    9                       'org.stubbles.examples.events.UserLoginLogging' 
     6stubClassLoader::load('net::stubbles::events::events', 
     7                      'org::stubbles::examples::events::Auth', 
     8                      'org::stubbles::examples::events::BlackList', 
     9                      'org::stubbles::examples::events::UserLoginLogging' 
    1010); 
    1111class Bootstrap 
  • trunk/examples/docroot/events/queue.php

    r778 r1234  
    33highlight_file(__FILE__); 
    44require '../bootstrap-stubbles.php'; 
    5 stubClassLoader::load('net.stubbles.events.events', 
    6                       'net.stubbles.ipo.request.stubWebRequest' 
     5stubClassLoader::load('net::stubbles::events::events', 
     6                      'net::stubbles::ipo::request::stubWebRequest' 
    77); 
    88class ExampleListener extends stubBaseObject implements stubEventListener 
  • trunk/examples/docroot/foreignClassLoaders/index.php

    r681 r1234  
    44 
    55require '../bootstrap-stubbles.php'; 
    6 stubClassLoader::load('net.stubbles.util.ext.stubXPClassLoader'); 
     6stubClassLoader::load('net::stubbles::util::ext::stubXPClassLoader'); 
    77stubClassLoader::registerForeignClassLoader(new stubXPClassLoader()); 
    8 stubClassLoader::load('net.xp_framework.text.String'); 
    9 stubClassLoader::load('net.stubbles.util.ext.stubPearClassLoader'); 
     8stubClassLoader::load('net::xp_framework::text::String'); 
     9stubClassLoader::load('net::stubbles::util::ext::stubPearClassLoader'); 
    1010stubClassLoader::registerForeignClassLoader(new stubPearClassLoader()); 
    11 stubClassLoader::load('net.php.pear.XML.Serializer'); 
     11stubClassLoader::load('net::php::pear::XML::Serializer'); 
    1212class Bootstrap 
    1313{ 
  • trunk/examples/docroot/ipc07/csvWriter.php

    r681 r1234  
    88 */ 
    99require '../bootstrap-stubbles.php'; 
    10 stubClassLoader::load('net.stubbles.reflection.reflection'); 
     10stubClassLoader::load('net::stubbles::reflection::reflection'); 
    1111 
    1212class stubCSVAnnotation extends stubAbstractAnnotation implements stubAnnotation { 
  • trunk/examples/docroot/ipc07/xmlSerializer.php

    r681 r1234  
    88 */ 
    99require '../bootstrap-stubbles.php'; 
    10 stubClassLoader::load('net.stubbles.xml.serializer.stubXMLSerializer', 
    11                       'net.stubbles.xml.stubXMLStreamWriterFactory'); 
     10stubClassLoader::load('net::stubbles::xml::serializer::stubXMLSerializer', 
     11                      'net::stubbles::xml::stubXMLStreamWriterFactory'); 
    1212 
    1313class PersonPlain { 
  • trunk/examples/docroot/ipc2007-ioc/ioc.php

    r999 r1234  
    11<?php 
    22require '../bootstrap-stubbles.php'; 
    3 stubClassLoader::load('net.stubbles.ioc.ioc'); 
     3stubClassLoader::load('net::stubbles::ioc::ioc'); 
    44 
    55require 'interfaces.php'; 
  • trunk/examples/docroot/ipc2007-ioc/xjconf.php

    r1000 r1234  
    11<?php 
    22require '../bootstrap-stubbles.php'; 
    3 stubClassLoader::load('net.stubbles.util.xjconf.xjconf'); 
    4 stubClassLoader::load('net.stubbles.util.xjconf.xjconfReal'); 
     3stubClassLoader::load('net::stubbles::util::xjconf::xjconf'); 
     4stubClassLoader::load('net::stubbles::util::xjconf::xjconfReal'); 
    55 
    66require 'interfaces.php'; 
  • trunk/examples/docroot/json-rpc/index.php

    r921 r1234  
    1515require '../bootstrap-stubbles.php'; 
    1616 
    17 stubClassLoader::load('net.stubbles.ipo.request.stubWebRequest', 
    18                       'net.stubbles.ipo.session.stubPHPSession'); 
     17stubClassLoader::load('net::stubbles::ipo::request::stubWebRequest', 
     18                      'net::stubbles::ipo::session::stubPHPSession'); 
    1919 
    2020$request = new stubWebRequest(); 
  • trunk/examples/docroot/json-rpc/jsonrpc.php

    r792 r1234  
    11<?php 
    22require '../bootstrap-stubbles.php'; 
    3 stubClassLoader::load('net.stubbles.service.jsonrpc.stubJsonRpcProcessor', 
    4                       'net.stubbles.websites.stubFrontController', 
    5                       'net.stubbles.ipo.interceptors.stubInterceptorXJConfInitializer', 
    6                       'net.stubbles.websites.processors.stubProcessorResolverXJConfFactory', 
    7                       'net.stubbles.util.stubRegistryXJConfInitializer' 
     3stubClassLoader::load('net::stubbles::service::jsonrpc::stubJsonRpcProcessor', 
     4                      'net::stubbles::websites::stubFrontController', 
     5                      'net::stubbles::ipo::interceptors::stubInterceptorXJConfInitializer', 
     6                      'net::stubbles::websites::processors::stubProcessorResolverXJConfFactory', 
     7                      'net::stubbles::util::stubRegistryXJConfInitializer' 
    88); 
    99 
  • trunk/examples/docroot/logging/index.php

    r681 r1234  
    44 
    55require '../bootstrap-stubbles.php'; 
    6 stubClassLoader::load('net.stubbles.ipo.request.stubWebRequest', 
    7                       'net.stubbles.ipo.session.stubPHPSession', 
    8                       'net.stubbles.util.log.log', 
    9                       'net.stubbles.util.log.stubLoggerXJConfFactory'); 
     6stubClassLoader::load('net::stubbles::ipo::request::stubWebRequest', 
     7                      'net::stubbles::ipo::session::stubPHPSession', 
     8                      'net::stubbles::util::log::log', 
     9                      'net::stubbles::util::log::stubLoggerXJConfFactory'); 
    1010class Bootstrap 
    1111{ 
     
    1919        $loggerXJConfFactory->init(); 
    2020 
    21         // both request and session normally are put into your application 
    22         // classes e.g. via stub(Pre|Post)Interceptor::(pre|post)process() 
    23         // or via stubPageElement::(isAvailable|process)() 
    24         $request = new stubWebRequest(); 
    25         $session = new stubPHPSession($request, 'SID'); 
    26  
    2721        // now the real work for logging 
    2822        // first we create a new logdata object with target trail and level 
     
    3226        // if property not set an instance of 
    3327        // net.stubbles.util.log.stubBaseLogData will be created 
    34         $logData = stubLogDataFactory::create($session, 'trail', stubLogger::LEVEL_INFO); 
     28        $logData = stubLogDataFactory::create('trail', stubLogger::LEVEL_INFO); 
    3529 
    3630        // we add some more data that we want to log 
  • trunk/examples/docroot/reflection/annotations.php

    r724 r1234  
    1212 
    1313// load the complete reflection package 
    14 stubClassLoader::load('net.stubbles.reflection.reflection'); 
     14stubClassLoader::load('net::stubbles::reflection::reflection'); 
    1515 
    1616/** 
  • trunk/examples/docroot/reflection/complex.php

    r716 r1234  
    33require '../bootstrap-stubbles.php'; 
    44 
    5 stubClassLoader::load('net.stubbles.reflection.reflection'); 
     5stubClassLoader::load('net::stubbles::reflection::reflection'); 
    66 
    77class Base extends stubBaseObject { 
  • trunk/examples/docroot/request/broker.php

    r965 r1234  
    1010require '../bootstrap-stubbles.php'; 
    1111 
    12 stubClassLoader::load('net.stubbles.ipo.request.stubWebRequest', 
    13                       'net.stubbles.ipo.request.broker.stubRequestBroker', 
    14                       'net.stubbles.ipo.request.filters.stubHtmlOutputFilter' 
     12stubClassLoader::load('net::stubbles::ipo::request::stubWebRequest', 
     13                      'net::stubbles::ipo::request::broker::stubRequestBroker', 
     14                      'net::stubbles::ipo::request::filters::stubHtmlOutputFilter' 
    1515); 
    1616/** 
  • trunk/examples/docroot/variants/variants.php

    r681 r1234  
    99require '../bootstrap-stubbles.php'; 
    1010 
    11 stubClassLoader::load('net.stubbles.websites.variantmanager.stubVariantXJConfFactory', 
    12                       'net.stubbles.ipo.request.stubWebRequest', 
    13                       'net.stubbles.ipo.session.stubPHPSession' 
     11stubClassLoader::load('net::stubbles::websites::variantmanager::stubVariantXJConfFactory', 
     12                      'net::stubbles::ipo::request::stubWebRequest', 
     13                      'net::stubbles::ipo::session::stubPHPSession' 
    1414); 
    1515class Bootstrap 
  • trunk/examples/docroot/websites-memphis/index.php

    r693 r1234  
    1313require '../bootstrap-stubbles.php'; 
    1414 
    15 stubClassLoader::load('net.stubbles.websites.stubFrontController', 
    16                       'net.stubbles.ipo.interceptors.stubInterceptorXJConfInitializer', 
    17                       'net.stubbles.websites.processors.stubProcessorResolverXJConfFactory', 
    18                       'net.stubbles.util.stubRegistryXJConfInitializer' 
     15stubClassLoader::load('net::stubbles::websites::stubFrontController', 
     16                      'net::stubbles::ipo::interceptors::stubInterceptorXJConfInitializer', 
     17                      'net::stubbles::websites::processors::stubProcessorResolverXJConfFactory', 
     18                      'net::stubbles::util::stubRegistryXJConfInitializer' 
    1919); 
    2020 
  • trunk/examples/docroot/websites-xml/index.php

    r705 r1234  
    1313require '../bootstrap-stubbles.php'; 
    1414 
    15 stubClassLoader::load('net.stubbles.websites.stubFrontController', 
    16                       'net.stubbles.ipo.interceptors.stubInterceptorXJConfInitializer', 
    17                       'net.stubbles.websites.processors.stubProcessorResolverXJConfFactory', 
    18                       'net.stubbles.util.stubRegistryXJConfInitializer' 
     15stubClassLoader::load('net::stubbles::websites::stubFrontController', 
     16                      'net::stubbles::ipo::interceptors::stubInterceptorXJConfInitializer', 
     17                      'net::stubbles::websites::processors::stubProcessorResolverXJConfFactory', 
     18                      'net::stubbles::util::stubRegistryXJConfInitializer' 
    1919); 
    2020 
  • trunk/examples/docroot/xml/serializer.php

    r681 r1234  
    88 */ 
    99require '../bootstrap-stubbles.php'; 
    10 stubClassLoader::load('net.stubbles.xml.serializer.stubXMLSerializer', 
    11                       'net.stubbles.xml.stubXMLStreamWriterFactory'); 
     10stubClassLoader::load('net::stubbles::xml::serializer::stubXMLSerializer', 
     11                      'net::stubbles::xml::stubXMLStreamWriterFactory'); 
    1212 
    1313/** 
  • trunk/examples/docroot/xml/streamWriter.php

    r681 r1234  
    99 */ 
    1010require '../bootstrap-stubbles.php'; 
    11 stubClassLoader::load('net.stubbles.xml.stubXMLStreamWriterFactory'); 
     11stubClassLoader::load('net::stubbles::xml::stubXMLStreamWriterFactory'); 
    1212 
    1313// get a stubXMLStreamWriter instance regardless of the implementation 
  • trunk/src/main/php/net/stubbles/ipo/session/resourcemanager/stubSessionResourceManager.php

    r1223 r1234  
    7979        $typeName = $type->getName(); 
    8080        foreach (array_keys($this->resourceDefinitions) as $interface) { 
    81             $localName = substr($interface, strrpos($interface, '.')+1); 
     81            $localName = stubClassLoader::getNonQualifiedClassName($interface); 
    8282            if ($localName === $typeName) { 
    8383                return $this->getResource($interface); 
     
    209209    { 
    210210        foreach (array_keys($this->resourceDefinitions) as $interface) { 
    211             $localName = substr($interface, strrpos($interface, '.') + 1); 
     211            $localName = stubClassLoader::getNonQualifiedClassName($interface); 
    212212            $binder->bind($localName)->toProvider($this); 
    213213        } 
  • trunk/src/main/php/net/stubbles/util/ext/stubPearClassLoader.php

    r448 r1234  
    2121     * @var  string 
    2222     */ 
    23     protected $namespace = 'net.php.pear'; 
     23    protected $namespace = 'net::php::pear'; 
    2424 
    2525    /** 
     
    5656        } 
    5757         
    58         require str_replace('.', DIRECTORY_SEPARATOR, str_replace($this->namespace . '.', '', $fqClassName)) . '.php'; 
     58        require str_replace('::', DIRECTORY_SEPARATOR, str_replace($this->namespace . '::', '', $fqClassName)) . '.php'; 
    5959    } 
    6060} 
  • trunk/src/main/php/org/stubbles/examples/pageelements/Shop.php

    r1221 r1234  
    155155     * 
    156156     * @return  string 
    157      * @DBColumn(name='status', defaultValue=Analyzable::STATUS_ENABLED
     157     * @DBColumn(name='status', defaultValue=5
    158158     * @XMLAttribute(attributeName='status'); 
    159159     */