Changeset 1246

Show
Ignore:
Timestamp:
01/16/08 15:43:10 (8 months ago)
Author:
mikey
Message:

replaced some overall used registry keys by class constants

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeFilePageElement.php

    r1231 r1246  
    99stubClassLoader::load('net::stubbles::lang::exceptions::stubFileNotFoundException', 
    1010                      'net::stubbles::util::stubRegistry', 
    11                       'net::stubbles::websites::memphis::stubMemphisPageElement' 
     11                      'net::stubbles::websites::memphis::stubMemphisPageElement', 
     12                      'net::stubbles::websites::memphis::stubMemphisTemplate' 
    1213); 
    1314/** 
     
    3738    public static function __static() 
    3839    { 
    39         self::$baseDir = stubRegistry::getConfig('net.stubbles.websites.memphis.templateDir', stubConfig::getPagePath() . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'templates'); 
     40        self::$baseDir = stubRegistry::getConfig(stubMemphisTemplate::REGISTRY_KEY_DIR, stubConfig::getPagePath() . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'templates'); 
    4041    } 
    4142 
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeTemplatePageElement.php

    r1231 r1246  
    3737    public static function __static() 
    3838    { 
    39         self::$tmplPath = stubRegistry::getConfig('net.stubbles.websites.memphis.templateDir', stubConfig::getPagePath() . '/../templates'); 
     39        self::$tmplPath = stubRegistry::getConfig(stubMemphisTemplate::REGISTRY_KEY_DIR, stubConfig::getPagePath() . '/../templates'); 
    4040    } 
    4141 
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisProcessor.php

    r1231 r1246  
    9090    protected function createTemplate() 
    9191    { 
    92         $template = new stubMemphisTemplate(stubRegistry::getConfig('net.stubbles.websites.memphis.templateDir', stubConfig::getPagePath() . '/../templates')); 
     92        $template = new stubMemphisTemplate(stubRegistry::getConfig(stubMemphisTemplate::REGISTRY_KEY_DIR, stubConfig::getPagePath() . '/../templates')); 
    9393        if (stubMode::$CURRENT->isCacheEnabled() === true) { 
    9494            $template->enableCache(); 
  • trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisTemplate.php

    r1231 r1246  
    2020{ 
    2121    /** 
     22     * registry key for template dir setting 
     23     */ 
     24    const REGISTRY_KEY_DIR        = 'net.stubbles.websites.memphis.templateDir'; 
     25    /** 
    2226     * the patTemplate instance 
    2327     * 
  • trunk/src/test/php/net/stubbles/integration/MemphisConfigTestCase.php

    r1220 r1246  
    77 * @subpackage  test_integration 
    88 */ 
    9 stubClassLoader::load('net::stubbles::websites::memphis::stubMemphisConfig'); 
     9stubClassLoader::load('net::stubbles::websites::memphis::stubMemphisConfig', 
     10                      'net::stubbles::websites::memphis::stubMemphisTemplate' 
     11); 
    1012/** 
    1113 * Integration test for memphis view engine configuration. 
     
    2123    public function testConfig() 
    2224    { 
    23         stubRegistry::setConfig('net.stubbles.websites.memphis.templateDir', TEST_SRC_PATH . DIRECTORY_SEPARATOR . 'resources'); 
     25        stubRegistry::setConfig(stubMemphisTemplate::REGISTRY_KEY_DIR, TEST_SRC_PATH . DIRECTORY_SEPARATOR . 'resources'); 
    2426        $memphisConfig = new stubMemphisConfig(); 
    2527        $this->assertEqual($memphisConfig->getParts(), array('content', 'navteasers', 'teasers', 'annotations', 'header'));