Changeset 1395

Show
Ignore:
Timestamp:
03/03/08 16:42:37 (7 months ago)
Author:
mikey
Message:

created foundation for enhancement #49: introduced new base interface stubInitializer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/events/stubEventsInitializer.php

    r1035 r1395  
    11<?php 
    22/** 
    3  * Interface for initializing the event configuration. 
     3 * Marker interface for initializing the event configuration. 
    44 * 
    55 * @author      Frank Kleine <mikey@stubbles.net> 
     
    77 * @subpackage  events 
    88 */ 
     9stubClassLoader::load('net::stubbles::lang::stubInitializer'); 
    910/** 
    10  * Interface for initializing the event configuration. 
     11 * Marker interface for initializing the event configuration. 
    1112 * 
    1213 * @package     stubbles 
    1314 * @subpackage  events 
    1415 */ 
    15 interface stubEventsInitializer extends stubObject 
     16interface stubEventsInitializer extends stubInitializer 
    1617{ 
    17     /** 
    18      * initialize the interceptors 
    19      */ 
    20     public function init(); 
     18    // intentionally empty 
    2119} 
    2220?> 
  • trunk/src/main/php/net/stubbles/events/stubEventsXJConfInitializer.php

    r1209 r1395  
    120120 
    121121    /** 
    122      * initialize the interceptors 
    123      * 
    124      * @throws  stubXJConfException 
    125      */ 
    126     public function init() 
    127     { 
    128         $xjconfProxy = new stubXJConfProxy($this); 
    129         $xjconfProxy->process(); 
    130     } 
    131  
    132     /** 
    133122     * does the preprocessing stuff 
    134123     * 
  • trunk/src/main/php/net/stubbles/ipo/interceptors/stubInterceptorInitializer.php

    r1223 r1395  
    88 */ 
    99stubClassLoader::load('net::stubbles::ipo::interceptors::stubPostInterceptor', 
    10                       'net::stubbles::ipo::interceptors::stubPreInterceptor' 
     10                      'net::stubbles::ipo::interceptors::stubPreInterceptor', 
     11                      'net::stubbles::lang::stubInitializer' 
    1112); 
    1213/** 
     
    1617 * @subpackage  ipo_interceptors 
    1718 */ 
    18 interface stubInterceptorInitializer extends stubObject 
     19interface stubInterceptorInitializer extends stubInitializer 
    1920{ 
    20     /** 
    21      * initialize the interceptors 
    22      * 
    23      * @throws  stubException 
    24      */ 
    25     public function init(); 
    26  
    2721    /** 
    2822     * sets the descriptor that identifies the initializer 
  • trunk/src/main/php/net/stubbles/ipo/interceptors/stubInterceptorXJConfInitializer.php

    r1265 r1395  
    151151 
    152152    /** 
    153      * initialize the interceptors 
    154      * 
    155      * @throws  stubXJConfException 
    156      */ 
    157     public function init() 
    158     { 
    159         $xjconfProxy = new stubXJConfProxy($this); 
    160         $xjconfProxy->process(); 
    161     } 
    162  
    163     /** 
    164153     * sets the list of pre interceptors 
    165154     * 
  • trunk/src/main/php/net/stubbles/rdbms/stubDatabaseInitializer.php

    r1281 r1395  
    6969 
    7070    /** 
    71      * initialize the Registry with configuration values from given configuration file 
    72      * 
    73      * @throws  stubXJConfException 
    74      */ 
    75     public function init() 
    76     { 
    77         $xjconfProxy = new stubXJConfProxy($this); 
    78         $xjconfProxy->process(); 
    79     } 
    80  
    81     /** 
    8271     * does the preprocessing stuff 
    8372     * 
  • trunk/src/main/php/net/stubbles/util/cache/stubCacheInitializer.php

    r1230 r1395  
    11<?php 
    22/** 
    3  * Interface for initializing the cache. 
     3 * Marker interface for initializing the cache. 
    44 * 
    55 * @author      Frank Kleine <mikey@stubbles.net> 
     
    77 * @subpackage  util_cache 
    88 */ 
    9 stubClassLoader::load('net::stubbles::ipo::interceptors::stubPreInterceptor'); 
     9stubClassLoader::load('net::stubbles::ipo::interceptors::stubPreInterceptor', 
     10                      'net::stubbles::lang::stubInitializer' 
     11); 
    1012/** 
    11  * Interface for initializing the cache. 
     13 * Marker interface for initializing the cache. 
    1214 * 
    1315 * @package     stubbles 
    1416 * @subpackage  util_cache 
    1517 */ 
    16 interface stubCacheInitializer extends stubPreInterceptor 
     18interface stubCacheInitializer extends stubPreInterceptor, stubInitializer 
    1719{ 
    18     /** 
    19      * does the real initializing 
    20      */ 
    21     public function init(); 
     20    // intentionally empty 
    2221} 
    2322?> 
  • trunk/src/main/php/net/stubbles/util/cache/stubCacheXJConfInitializer.php

    r1281 r1395  
    6969 
    7070    /** 
    71      * does the real initializing 
    72      */ 
    73     public function init() 
    74     { 
    75         $xjconfProxy = new stubXJConfProxy($this); 
    76         $xjconfProxy->process(); 
    77     } 
    78  
    79     /** 
    8071     * does the preprocessing stuff 
    8172     * 
  • trunk/src/main/php/net/stubbles/util/log/stubLoggerXJConfFactory.php

    r1281 r1395  
    111111        // intentionally empty, all stubLogger instances are inside a static member of stubLogger 
    112112    } 
    113  
    114     /** 
    115      * initialize the stubLogger 
    116      * 
    117      * @throws  stubXJConfException 
    118      */ 
    119     public function init() 
    120     { 
    121         $xjconfProxy = new stubXJConfProxy($this); 
    122         $xjconfProxy->process(); 
    123     } 
    124113} 
    125114?> 
  • trunk/src/main/php/net/stubbles/util/stubRegistryInitializer.php

    r1301 r1395  
    77 * @subpackage  util 
    88 */ 
     9stubClassLoader::load('net::stubbles::lang::stubInitializer'); 
    910/** 
    1011 * Interface for initializing the Registry. 
     
    1314 * @subpackage  util 
    1415 */ 
    15 interface stubRegistryInitializer extends stubObject 
     16interface stubRegistryInitializer extends stubInitializer 
    1617{ 
    1718    /** 
     
    2122     */ 
    2223    public function setConfigSource($source); 
    23      
    24     /** 
    25      * initialize the Registry with configuration values 
    26      */ 
    27     public function init(); 
    2824} 
    2925?> 
  • trunk/src/main/php/net/stubbles/util/stubRegistryXJConfInitializer.php

    r1307 r1395  
    9797        // intentionally empty 
    9898    } 
    99  
    100     /** 
    101      * initialize the Registry with configuration values from given configuration file 
    102      * 
    103      * @throws  stubXJConfException 
    104      */ 
    105     public function init() 
    106     { 
    107         $xjconfProxy = new stubXJConfProxy($this); 
    108         $xjconfProxy->process(); 
    109     } 
    11099} 
    111100?> 
  • trunk/src/main/php/net/stubbles/util/xjconf/stubXJConfAbstractInitializer.php

    r1281 r1395  
    1818abstract class stubXJConfAbstractInitializer extends stubBaseObject implements stubXJConfInitializer 
    1919{ 
     20    /** 
     21     * initialize the interceptors 
     22     * 
     23     * @throws  stubXJConfException 
     24     */ 
     25    public function init() 
     26    { 
     27        $xjconfProxy = new stubXJConfProxy($this); 
     28        $xjconfProxy->process(); 
     29    } 
     30 
    2031    /** 
    2132     * returns definitions that are additionally required beyond the default definition 
  • trunk/src/main/php/net/stubbles/util/xjconf/stubXJConfInitializer.php

    r1307 r1395  
    88 * @subpackage  util_xjconf 
    99 */ 
    10 stubClassLoader::load('net::stubbles::util::xjconf::stubXJConfFacade'); 
     10stubClassLoader::load('net::stubbles::lang::stubInitializer', 
     11                      'net::stubbles::util::xjconf::stubXJConfFacade' 
     12); 
    1113/** 
    1214 * Common interface for XJConf based initializers and factories that use the 
     
    1618 * @subpackage  util_xjconf 
    1719 */ 
    18 interface stubXJConfInitializer extends stubObject 
     20interface stubXJConfInitializer extends stubObject, stubInitializer 
    1921{ 
    2022    /** 
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisConfig.php

    r1281 r1395  
    3030    public function __construct() 
    3131    { 
    32         $xjconfProxy = new stubXJConfProxy($this); 
    33         $xjconfProxy->process(); 
     32        $this->init(); 
    3433        if (isset($this->config['parts']) === false || count($this->config['parts']) === 0) { 
    3534            throw new stubRuntimeException('No parts configured.'); 
  • trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolverFactory.php

    r1231 r1395  
    77 * @subpackage  websites_processors 
    88 */ 
    9 stubClassLoader::load('net::stubbles::websites::processors::stubProcessorResolver'); 
     9stubClassLoader::load('net::stubbles::lang::stubInitializer', 
     10                      'net::stubbles::websites::processors::stubProcessorResolver' 
     11); 
    1012/** 
    1113 * Interface for creating a resolver. 
     
    1416 * @subpackage  websites_processors 
    1517 */ 
    16 interface stubProcessorResolverFactory extends stubObject 
     18interface stubProcessorResolverFactory extends stubInitializer 
    1719{ 
    18     /** 
    19      * initialize the resolver 
    20      * 
    21      * @throws  stubException 
    22      */ 
    23     public function init(); 
    24  
    2520    /** 
    2621     * returns the resolver 
  • trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolverXJConfFactory.php

    r1281 r1395  
    6969 
    7070    /** 
    71      * initialize the resolver 
    72      * 
    73      * @throws  stubXJConfException 
    74      */ 
    75     public function init() 
    76     { 
    77         $xjconfProxy = new stubXJConfProxy($this); 
    78         $xjconfProxy->process(); 
    79     } 
    80  
    81     /** 
    8271     * sets the resolver 
    8372     * 
  • trunk/src/main/php/net/stubbles/websites/variantmanager/stubVariantXJConfFactory.php

    r1281 r1395  
    2626    public function __construct() 
    2727    { 
    28         $xjconfProxy = new stubXJConfProxy($this); 
    2928        try { 
    30             $xjconfProxy->process(); 
     29            $this->init(); 
    3130        } catch (stubXJConfException $xjce) { 
    3231            throw new stubVariantConfigurationException('Can not read variant configuration: ' . $xjce->getMessage(), $xjce); 
    3332        } 
     33    } 
     34 
     35    /** 
     36     * initialize the interceptors 
     37     * 
     38     * @throws  stubXJConfException 
     39     */ 
     40    public function init() 
     41    { 
     42        $xjconfProxy = new stubXJConfProxy($this); 
     43        $xjconfProxy->process(); 
    3444    } 
    3545