Changeset 1209

Show
Ignore:
Timestamp:
01/11/08 01:44:43 (9 months ago)
Author:
mikey
Message:

first part of refactoring #119
This breaks star files, they will be fixed next.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/auth/storage/stubAuthAbstractStorage.php

    r756 r1209  
    77 * @subpackage  auth_storage 
    88 */ 
    9 stubClassLoader::load('net.stubbles.auth.storage.stubAuthStorage'); 
     9stubClassLoader::load('net::stubbles::auth::storage::stubAuthStorage'); 
    1010/** 
    1111 * Basic implementation for the authentication result. 
  • trunk/src/main/php/net/stubbles/auth/storage/stubAuthSessionStorage.php

    r756 r1209  
    77 * @subpackage  auth_storage 
    88 */ 
    9 stubClassLoader::load('net.stubbles.auth.storage.stubAuthAbstractStorage', 
    10                       'net.stubbles.ipo.session.stubSession' 
     9stubClassLoader::load('net::stubbles::auth::storage::stubAuthAbstractStorage', 
     10                      'net::stubbles::ipo::session::stubSession' 
    1111); 
    1212/** 
  • trunk/src/main/php/net/stubbles/auth/strategy/stubAuthFailOverStrategy.php

    r756 r1209  
    77 * @subpackage  auth_strategy 
    88 */ 
    9 stubClassLoader::load('net.stubbles.auth.strategy.stubAuthStrategy'); 
     9stubClassLoader::load('net::stubbles::auth::strategy::stubAuthStrategy'); 
    1010/** 
    1111 * Authentication strategy that uses the first authenticator and the other only if the first fails. 
  • trunk/src/main/php/net/stubbles/auth/strategy/stubAuthOrStrategy.php

    r756 r1209  
    77 * @subpackage  auth_strategy 
    88 */ 
    9 stubClassLoader::load('net.stubbles.auth.strategy.stubAuthStrategy'); 
     9stubClassLoader::load('net::stubbles::auth::strategy::stubAuthStrategy'); 
    1010/** 
    1111 * Authentication strategy that tries all authenticators until one was successful or all have been used. 
  • trunk/src/main/php/net/stubbles/auth/stubAuth.php

    r756 r1209  
    77 * @subpackage  auth 
    88 */ 
    9 stubClassLoader::load('net.stubbles.auth.authenticators.stubAuthenticator', 
    10                       'net.stubbles.auth.storage.stubAuthStorage', 
    11                       'net.stubbles.auth.strategy.stubAuthStrategy', 
    12                       'net.stubbles.auth.stubAuthException', 
    13                       'net.stubbles.auth.stubAuthResult' 
     9stubClassLoader::load('net::stubbles::auth::authenticators::stubAuthenticator', 
     10                      'net::stubbles::auth::storage::stubAuthStorage', 
     11                      'net::stubbles::auth::strategy::stubAuthStrategy', 
     12                      'net::stubbles::auth::stubAuthException', 
     13                      'net::stubbles::auth::stubAuthResult' 
    1414); 
    1515/** 
  • trunk/src/main/php/net/stubbles/events/events.php

    r97 r1209  
    77 * @subpackage  events 
    88 */ 
    9 stubClassLoader::load('net.stubbles.events.stubEvent', 
    10                       'net.stubbles.events.stubEventListener', 
    11                       'net.stubbles.events.stubEventDispatcher' 
     9stubClassLoader::load('net::stubbles::events::stubEvent', 
     10                      'net::stubbles::events::stubEventListener', 
     11                      'net::stubbles::events::stubEventDispatcher' 
    1212); 
    1313?> 
  • trunk/src/main/php/net/stubbles/events/stubCallbackListener.php

    r1127 r1209  
    77 * @subpackage  events 
    88 */ 
    9 stubClassLoader::load('net.stubbles.events.stubCallbackException', 
    10                       'net.stubbles.events.stubEvent', 
    11                       'net.stubbles.events.stubEventListener', 
    12                       'net.stubbles.lang.exceptions.stubIllegalArgumentException' 
     9stubClassLoader::load('net::stubbles::events::stubCallbackException', 
     10                      'net::stubbles::events::stubEvent', 
     11                      'net::stubbles::events::stubEventListener', 
     12                      'net::stubbles::lang::exceptions::stubIllegalArgumentException' 
    1313); 
    1414/** 
  • trunk/src/main/php/net/stubbles/events/stubEventDispatcher.php

    r1035 r1209  
    88 * @subpackage  events 
    99 */ 
    10 stubClassLoader::load('net.stubbles.events.stubEvent', 
    11                       'net.stubbles.events.stubEventListener' 
     10stubClassLoader::load('net::stubbles::events::stubEvent', 
     11                      'net::stubbles::events::stubEventListener' 
    1212); 
    1313/** 
  • trunk/src/main/php/net/stubbles/events/stubEventsXJConfInitializer.php

    r1174 r1209  
    77 * @subpackage  events 
    88 */ 
    9 stubClassLoader::load('net.stubbles.events.events', 
    10                       'net.stubbles.events.stubEventsInitializer', 
    11                       'net.stubbles.ipo.interceptors.stubPreInterceptor', 
    12                       'net.stubbles.lang.exceptions.stubIllegalArgumentException', 
    13                       'net.stubbles.util.xjconf.xjconf' 
     9stubClassLoader::load('net::stubbles::events::events', 
     10                      'net::stubbles::events::stubEventsInitializer', 
     11                      'net::stubbles::ipo::interceptors::stubPreInterceptor', 
     12                      'net::stubbles::lang::exceptions::stubIllegalArgumentException', 
     13                      'net::stubbles::util::xjconf::xjconf' 
    1414); 
    1515/** 
  • trunk/src/main/php/net/stubbles/events/stubLazyEventListener.php

    r1127 r1209  
    77 * @subpackage  events 
    88 */ 
    9 stubClassLoader::load('net.stubbles.events.stubEventListener'); 
     9stubClassLoader::load('net::stubbles::events::stubEventListener'); 
    1010/** 
    1111 * Class for lazy loading of concrete event listeners. 
  • trunk/src/main/php/net/stubbles/events/stubNonCancelableEvent.php

    r345 r1209  
    77 * @subpackage  events 
    88 */ 
    9 stubClassLoader::load('net.stubbles.events.stubEvent'); 
     9stubClassLoader::load('net::stubbles::events::stubEvent'); 
    1010/** 
    1111 * Event that can not be cancelled. 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubAbstractExceptionHandler.php

    r1093 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.ipo.response.stubBaseResponse', 
    10                       'net.stubbles.lang.errorhandler.stubExceptionHandler', 
    11                       'net.stubbles.util.log.log' 
     9stubClassLoader::load('net::stubbles::ipo::response::stubBaseResponse', 
     10                      'net::stubbles::lang::errorhandler::stubExceptionHandler', 
     11                      'net::stubbles::util::log::log' 
    1212); 
    1313/** 
     
    102102    protected function log(Exception $exception) 
    103103    { 
    104         stubClassLoader::load('net.stubbles.util.log.log'); 
    105104        $logData = stubLogDataFactory::create($this->logTarget, $this->logLevel); 
    106105        $logData->addData(($exception instanceof stubThrowable) ? ($exception->getClassName()) : (get_class($exception))); 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubCompositeErrorHandler.php

    r1102 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubErrorHandler'); 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubErrorHandler'); 
    1010/** 
    1111 * Container for a collection of PHP error handlers. 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubDefaultErrorHandler.php

    r1095 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubCompositeErrorHandler', 
    10                       'net.stubbles.lang.errorhandler.stubIllegalArgumentErrorHandler', 
    11                       'net.stubbles.lang.errorhandler.stubLogErrorHandler' 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubCompositeErrorHandler', 
     10                      'net::stubbles::lang::errorhandler::stubIllegalArgumentErrorHandler', 
     11                      'net::stubbles::lang::errorhandler::stubLogErrorHandler' 
    1212); 
    1313/** 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubDisplayExceptionHandler.php

    r1092 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubAbstractExceptionHandler'); 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubAbstractExceptionHandler'); 
    1010/** 
    1111 * Exception handler that displays the exception message nicely formated in the response. 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubIllegalArgumentErrorHandler.php

    r1092 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubErrorHandler', 
    10                       'net.stubbles.lang.exceptions.stubIllegalArgumentException' 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubErrorHandler', 
     10                      'net::stubbles::lang::exceptions::stubIllegalArgumentException' 
    1111); 
    1212/** 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubLogErrorHandler.php

    r1118 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubErrorHandler'); 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubErrorHandler'); 
    1010/** 
    1111 * Error handler that logs all errors. 
  • trunk/src/main/php/net/stubbles/lang/errorhandler/stubProdModeExceptionHandler.php

    r1092 r1209  
    77 * @subpackage  lang_errorhandler 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.errorhandler.stubAbstractExceptionHandler'); 
     9stubClassLoader::load('net::stubbles::lang::errorhandler::stubAbstractExceptionHandler'); 
    1010/** 
    1111 * Exception handler for production mode: triggers a 500 Internal Server Error response. 
  • trunk/src/main/php/net/stubbles/lang/exceptions/stubChainedException.php

    r777 r1209  
    5151     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    5252     * <code> 
    53      * example.MyException { 
     53     * example::MyException { 
    5454     *     message(string): This is an exception. 
    5555     *     file(string): foo.php 
  • trunk/src/main/php/net/stubbles/lang/exceptions/stubException.php

    r887 r1209  
    2323    public function getClass() 
    2424    { 
    25         stubClassLoader::load('net.stubbles.reflection.stubReflectionObject'); 
     25        stubClassLoader::load('net::stubbles::reflection::stubReflectionObject'); 
    2626        $refObject = new stubReflectionObject($this); 
    2727        return $refObject; 
     
    3636    public function getPackage() 
    3737    { 
    38          stubClassLoader::load('net.stubbles.reflection.stubReflectionPackage'); 
     38         stubClassLoader::load('net::stubbles::reflection::stubReflectionPackage'); 
    3939         $refPackage = new stubReflectionPackage(stubClassLoader::getPackageName($this->getClassName())); 
    4040         return $refPackage; 
     
    9696     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    9797     * <code> 
    98      * example.MyException { 
     98     * example::MyException { 
    9999     *     message(string): This is an exception. 
    100100     *     file(string): foo.php 
  • trunk/src/main/php/net/stubbles/lang/exceptions/stubFileNotFoundException.php

    r1127 r1209  
    11<?php 
    22/** 
    3  * Exception to be thrown in case a file could not be found 
     3 * Exception to be thrown in case a file could not be found. 
    44 * 
    55 * @author      Stephan Schmidt <schst@stubbles.net> 
     
    77 * @subpackage  lang_exceptions 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.exceptions.stubIOException'); 
     9stubClassLoader::load('net::stubbles::lang::exceptions::stubIOException'); 
    1010/** 
    11  * Exception to be thrown in case an IO error occurred. 
     11 * Exception to be thrown in case a file could not be found. 
    1212 * 
    1313 * @author      Stephan Schmidt <schst@stubbles.net> 
  • trunk/src/main/php/net/stubbles/lang/exceptions/stubMethodNotSupportedException.php

    r958 r1209  
    88 * @subpackage  lang_exceptions 
    99 */ 
    10 stubClassLoader::load('net.stubbles.lang.exceptions.stubRuntimeException'); 
     10stubClassLoader::load('net::stubbles::lang::exceptions::stubRuntimeException'); 
    1111/** 
    1212 * Exception to be thrown in case a method is called which is not supported by 
  • trunk/src/main/php/net/stubbles/lang/exceptions/stubRuntimeException.php

    r887 r1209  
    2828    public function getClass() 
    2929    { 
    30         stubClassLoader::load('net.stubbles.reflection.stubReflectionObject'); 
     30        stubClassLoader::load('net::stubbles::reflection::stubReflectionObject'); 
    3131        $refObject = new stubReflectionObject($this); 
    3232        return $refObject; 
     
    4141    public function getPackage() 
    4242    { 
    43          stubClassLoader::load('net.stubbles.reflection.stubReflectionPackage'); 
     43         stubClassLoader::load('net::stubbles::reflection::stubReflectionPackage'); 
    4444         $refPackage = new stubReflectionPackage(stubClassLoader::getPackageName($this->getClassName())); 
    4545         return $refPackage; 
     
    101101     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    102102     * <code> 
    103      * net.stubbles.lang.exceptions.stubRuntimeException { 
     103     * net::stubbles::lang::exceptions::stubRuntimeException { 
    104104     *     message(string): This is a runtime exception. 
    105105     *     file(string): foo.php 
  • trunk/src/main/php/net/stubbles/lang/serialize/stubSerializedObject.php

    r777 r1209  
    121121    public function getClass() 
    122122    { 
    123         stubClassLoader::load('net.stubbles.reflection.stubReflectionObject'); 
     123        stubClassLoader::load('net::stubbles::reflection::stubReflectionObject'); 
    124124        $refObject = new stubReflectionObject($this); 
    125125        return $refObject; 
     
    134134    public function getPackage() 
    135135    { 
    136          stubClassLoader::load('net.stubbles.reflection.stubReflectionPackage'); 
     136         stubClassLoader::load('net::stubbles::reflection::stubReflectionPackage'); 
    137137         $refPackage = new stubReflectionPackage(stubClassLoader::getPackageName($this->getClassName())); 
    138138         return $refPackage; 
     
    206206     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    207207     * <code> 
    208      * net.stubbles.lang.serialize.stubSerializedObject { 
    209      *     class(string): net.stubbles.stubExample 
    210      *     data(string): [serialized representation of net.stubbles.stubExample] 
     208     * net::stubbles::lang::serialize::stubSerializedObject { 
     209     *     class(string): net:.stubbles::stubExample 
     210     *     data(string): [serialized representation of net::stubbles::stubExample] 
    211211     * } 
    212212     * </code> 
  • trunk/src/main/php/net/stubbles/lang/stubBaseObject.php

    r1127 r1209  
    2525    public function getClass() 
    2626    { 
    27         stubClassLoader::load('net.stubbles.reflection.stubReflectionObject'); 
     27        stubClassLoader::load('net::stubbles::reflection::stubReflectionObject'); 
    2828        $refObject = new stubReflectionObject($this); 
    2929        return $refObject; 
     
    3838    public function getPackage() 
    3939    { 
    40          stubClassLoader::load('net.stubbles.reflection.stubReflectionPackage'); 
     40         stubClassLoader::load('net::stubbles::reflection::stubReflectionPackage'); 
    4141         $refPackage = new stubReflectionPackage(stubClassLoader::getPackageName($this->getClassName())); 
    4242         return $refPackage; 
     
    9999     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    100100     * <code> 
    101      * example.MyClass { 
     101     * example::MyClass { 
    102102     *     foo(string): hello 
    103      *     bar(example.AnotherClass): example.AnotherClass { 
     103     *     bar(example::AnotherClass): example::AnotherClass { 
    104104     *         baz(int): 5 
    105105     *     } 
     
    147147     * [fully-qualified-class-name] ' {' [members-and-value-list] '}' 
    148148     * <code> 
    149      * example.MyClass { 
     149     * example::MyClass { 
    150150     *     foo(string): hello 
    151      *     bar(example.AnotherClass): example.AnotherClass { 
     151     *     bar(example::AnotherClass): example::AnotherClass { 
    152152     *         baz(int): 5 
    153153     *     } 
  • trunk/src/main/php/net/stubbles/lang/stubEnum.php

    r1127 r1209  
    77 * @subpackage  lang 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.exceptions.stubIllegalArgumentException'); 
     9stubClassLoader::load('net::stubbles::lang::exceptions::stubIllegalArgumentException'); 
    1010/** 
    1111 * Base class for enums. 
  • trunk/src/main/php/net/stubbles/lang/stubMode.php

    r1139 r1209  
    77 * @subpackage  lang 
    88 */ 
    9 stubClassLoader::load('net.stubbles.lang.stubEnum', 
    10                       'net.stubbles.lang.exceptions.stubIllegalArgumentException' 
     9stubClassLoader::load('net::stubbles::lang::stubEnum', 
     10                      'net::stubbles::lang::exceptions::stubIllegalArgumentException' 
    1111); 
    1212/** 
     
    114114        // production mode 
    115115        self::$PROD                     = new self('PROD', 0); 
    116         self::$PROD->exceptionHandler   = array('class'  => 'net.stubbles.lang.errorhandler.stubProdModeExceptionHandler', 
    117                                                 'method' => 'handleException', 
    118                                                 'type'   => self::HANDLER_INSTANCE 
    119                                           ); 
    120         self::$PROD->errorHandler       = array('class'  => 'net.stubbles.lang.errorhandler.stubDefaultErrorHandler', 
     116        self::$PROD->exceptionHandler   = array('class'  => 'net::stubbles::lang::errorhandler::stubProdModeExceptionHandler', 
     117                                                'method' => 'handleException', 
     118                                                'type'   => self::HANDLER_INSTANCE 
     119                                          ); 
     120        self::$PROD->errorHandler       = array('class'  => 'net::stubbles::lang::errorhandler::stubDefaultErrorHandler', 
    121121                                                'method' => 'handle', 
    122122                                                'type'   => self::HANDLER_INSTANCE 
     
    125125        // test mode 
    126126        self::$TEST                     = new self('TEST', 1); 
    127         self::$TEST->exceptionHandler   = array('class'  => 'net.stubbles.lang.errorhandler.stubDisplayExceptionHandler', 
    128                                                 'method' => 'handleException', 
    129                                                 'type'   => self::HANDLER_INSTANCE 
    130                                           ); 
    131         self::$TEST->errorHandler       = array('class'  => 'net.stubbles.lang.errorhandler.stubDefaultErrorHandler', 
     127        self::$TEST->exceptionHandler   = array('class'  => 'net::stubbles::lang::errorhandler::stubDisplayExceptionHandler', 
     128                                                'method' => 'handleException', 
     129                                                'type'   => self::HANDLER_INSTANCE 
     130                                          ); 
     131        self::$TEST->errorHandler       = array('class'  => 'net::stubbles::lang::errorhandler::stubDefaultErrorHandler', 
    132132                                                'method' => 'handle', 
    133133                                                'type'   => self::HANDLER_INSTANCE 
     
    136136        // stage mode 
    137137        self::$STAGE                    = new self('STAGE', 2); 
    138         self::$STAGE->exceptionHandler  = array('class'  => 'net.stubbles.lang.errorhandler.stubDisplayExceptionHandler', 
     138        self::$STAGE->exceptionHandler  = array('class'  => 'net::stubbles::lang::errorhandler::stubDisplayExceptionHandler', 
    139139                                                'method' => 'handleException', 
    140140                                                'type'   => self::HANDLER_INSTANCE 
     
    144144        // development mode 
    145145        self::$DEV                      = new self('DEV', 3); 
    146         self::$DEV->exceptionHandler    = array('class'  => 'net.stubbles.lang.errorhandler.stubDisplayExceptionHandler', 
     146        self::$DEV->exceptionHandler    = array('class'  => 'net::stubbles::lang::errorhandler::stubDisplayExceptionHandler', 
    147147                                                'method' => 'handleException', 
    148148                                                'type'   => self::HANDLER_INSTANCE 
  • trunk/src/main/php/net/stubbles/lang/stubObject.php

    r777 r1209  
    6969     * example.MyClass { 
    7070     *     foo(string): hello 
    71      *     bar(example.AnotherClass): example.AnotherClass { 
     71     *     bar(example::AnotherClass): example::AnotherClass { 
    7272     *         baz(int): 5 
    7373     *     } 
  • trunk/src/main/php/net/stubbles/reflection/stubReflectionClass.php

    r1127 r1209  
    3737    public function __construct($className) 
    3838    { 
    39         if (strstr($className, '.') !== false) { 
     39        if (strstr($className, '::') !== false || strstr($className, '.') !== false) { 
    4040            $nqClassName = stubClassLoader::getNonQualifiedClassName($className); 
    4141            if (class_exists($nqClassName, false) === false) { 
  • trunk/src/main/php/net/stubbles/reflection/stubReflectionPackage.php

    r733 r1209  
    77 * @subpackage  reflection 
    88 */ 
    9 stubClassLoader::load('net.stubbles.reflection.stubBaseReflectionClass'); 
     9stubClassLoader::load('net::stubbles::reflection::stubBaseReflectionClass'); 
    1010/** 
    1111 * Extended Reflection class for packages. 
     
    1717{ 
    1818    /** 
     19     * the package separator character 
     20     */ 
     21    const SEPARATOR = '::'; 
     22    /** 
    1923     * name of the reflected package 
    2024     * 
     
    6367    public function __toString() 
    6468    { 
    65         return 'net.stubbles.reflection.stubReflectionPackage[' . $this->packageName . "] {\n}\n"; 
     69        return 'net::stubbles::reflection::stubReflectionPackage[' . $this->packageName . "] {\n}\n"; 
    6670    } 
    6771 
     
    8589    { 
    8690        $classNames = stubClassLoader::getClassNames($this->packageName, false); 
    87         return in_array($this->packageName . '.' . $nqClassName, $classNames); 
     91        return in_array($this->packageName . self::SEPARATOR . $nqClassName, $classNames); 
    8892    } 
    8993 
     
    97101    public function getClass($nqClassName) 
    98102    { 
    99         $stubRefClass = new stubReflectionClass($this->packageName . '.' . $nqClassName); 
     103        $stubRefClass = new stubReflectionClass($this->packageName . self::SEPARATOR . $nqClassName); 
    100104        return $stubRefClass; 
    101105    } 
     
    148152    public function getPackage($name) 
    149153    { 
    150         return new self($this->packageName . '.' . $name); 
     154        return new self($this->packageName . self::SEPARATOR . $name); 
    151155    } 
    152156 
     
    167171            } 
    168172 
    169             $shortName = str_replace($this->packageName . '.', '', $packageName); 
    170             if (strstr($shortName, '.') !== false && false === $recursive) { 
     173            $shortName = str_replace($this->packageName . self::SEPARATOR, '', $packageName); 
     174            if (strstr($shortName, self::SEPARATOR) !== false && false === $recursive) { 
    171175                continue; 
    172176            } 
     
    191195        $refPackages = array(); 
    192196        foreach ($packages as $package) { 
    193             $refPackages[] = new self($this->packageName . '.' . $package); 
     197            $refPackages[] = new self($this->packageName . self::SEPARATOR . $package); 
    194198        } 
    195199 
  • trunk/src/main/php/net/stubbles/stubClassLoader.php

    r887 r1209  
    9999    public function __toString() 
    100100    { 
    101         $string  = "net.stubbles.stubClassNotFoundException {\n"; 
     101        $string  = "net::stubbles::stubClassNotFoundException {\n"; 
    102102        $string .= '    message(string): ' . $this->getMessage() . "\n"; 
    103103        $string .= '    classname(string): ' . $this->fqClassName . "\n"; 
     
    126126     * @var  array<string,string> 
    127127     */ 
    128     private static $classNames          = array('net.stubbles.stubClassLoader'            => 'stubClassLoader', 
    129                                                 'net.stubbles.stubClassNotFoundException' => 'stubClassNotFoundException', 
    130                                                 'net.stubbles.stubForeignClassLoader'     => 'stubForeignClassLoader' 
     128    private static $classNames          = array('net::stubbles::stubClassLoader'            => 'stubClassLoader', 
     129                                                'net::stubbles::stubClassNotFoundException' => 'stubClassNotFoundException', 
     130                                                'net::stubbles::stubForeignClassLoader'     => 'stubForeignClassLoader' 
    131131                                          ); 
    132132    /** 
     
    207207            } 
    208208            if (null === $uri) { 
    209                 $uri = self::$sourcePath .  str_replace('.', DIRECTORY_SEPARATOR, $fqClassName) . '.php'; 
     209                $uri = self::$sourcePath .  str_replace('::', DIRECTORY_SEPARATOR, str_replace('.', DIRECTORY_SEPARATOR, $fqClassName)) . '.php'; 
    210210            } 
    211211 
     
    233233        } 
    234234 
    235         $dirName = self::$sourcePath . str_replace('.', DIRECTORY_SEPARATOR, $packageName); 
     235        $dirName = self::$sourcePath . str_replace('.', DIRECTORY_SEPARATOR, str_replace('::', DIRECTORY_SEPARATOR, $packageName)); 
    236236        if (file_exists($dirName) == false) { 
    237237            return array(); 
     
    250250            } 
    251251 
    252             $classes[] = str_replace(DIRECTORY_SEPARATOR, '.', str_replace('.php', '', str_replace(self::$sourcePath, '', $file->getPathname()))); 
     252            $classes[] = str_replace(DIRECTORY_SEPARATOR, '::', str_replace('.php', '', str_replace(self::$sourcePath, '', $file->getPathname()))); 
    253253        } 
    254254 
     
    281281    public static function getNonQualifiedClassName($fqClassName) 
    282282    { 
    283         $classNameParts = explode('.', $fqClassName); 
     283        if (strstr($fqClassName, '.') === false) { 
     284            $classNameParts = explode('::', $fqClassName); 
     285        } else { 
     286            $classNameParts = explode('.', $fqClassName); 
     287        } 
     288         
    284289        return $classNameParts[count($classNameParts) - 1]; 
    285290    } 
     
    308313    public static function getPackageName($fqClassName) 
    309314    { 
    310         $classNameParts = explode('.', $fqClassName); 
     315        $classNameParts = explode('::', $fqClassName); 
    311316        unset($classNameParts[count($classNameParts) - 1]); 
    312         return join('.', $classNameParts); 
     317        return join('::', $classNameParts); 
    313318    } 
    314319 
     
    344349 * every other class that should extend it 
    345350 */ 
    346 stubClassLoader::load('net.stubbles.lang.stubObject', 
    347                       'net.stubbles.lang.stubBaseObject', 
    348                       'net.stubbles.lang.exceptions.stubThrowable', 
    349                       'net.stubbles.lang.exceptions.stubException', 
    350                       'net.stubbles.lang.exceptions.stubRuntimeException', 
    351                       'net.stubbles.lang.serialize.stubSerializable', 
    352                       'net.stubbles.lang.serialize.stubSerializableObject', 
    353                       'net.stubbles.lang.serialize.stubSerializedObject' 
     351stubClassLoader::load('net::stubbles::lang::stubObject', 
     352                      'net::stubbles::lang::stubBaseObject', 
     353                      'net::stubbles::lang::exceptions::stubThrowable', 
     354                      'net::stubbles::lang::exceptions::stubException', 
     355                      'net::stubbles::lang::exceptions::stubRuntimeException', 
     356                      'net::stubbles::lang::serialize::stubSerializable', 
     357                      'net::stubbles::lang::serialize::stubSerializableObject', 
     358                      'net::stubbles::lang::serialize::stubSerializedObject' 
    354359); 
    355360?> 
  • trunk/src/main/php/net/stubbles/util/xjconf/stubXJConfLoader.php

    r580