Changeset 1119
- Timestamp:
- 12/06/07 13:52:10 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisIncludeTemplatePageElement.php
r1113 r1119 8 8 */ 9 9 stubClassLoader::load('net.stubbles.lang.exceptions.stubFileNotFoundException', 10 'net.stubbles.websites.memphis.stubMemphisPageElement' 10 'net.stubbles.websites.memphis.stubMemphisPageElement', 11 'net.stubbles.websites.memphis.stubMemphisTemplate' 11 12 ); 12 13 /** trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisTemplate.php
r814 r1119 8 8 */ 9 9 stubClassLoader::load('net.stubbles.lang.exceptions.stubIllegalAccessException', 10 'net.stubbles.util.stubRegistry', 11 'net.stubbles.util.ext.stubPhpToolsClassLoader' 10 'net.stubbles.util.stubRegistry' 12 11 ); 13 12 /** … … 26 25 */ 27 26 protected $template; 28 29 27 /** 30 * static initializing 28 * switch whether template classes are already initialized or not 29 * 30 * @var bool 31 31 */ 32 public function __static() 33 { 34 $patClassLoader = new stubPhpToolsClassLoader(stubRegistry::getConfig('net.php-tools.path', stubConfig::getLibPath() . '/pat')); 35 stubClassLoader::registerForeignClassLoader($patClassLoader); 36 stubClassLoader::load('net.php-tools.patErrorManager'); 37 stubClassLoader::load('net.php-tools.patTemplate'); 38 } 32 protected static $initialized = false; 39 33 40 34 /** … … 47 41 public function __construct($baseDir, array $namespaces = array(), array $options = array()) 48 42 { 49 if (count($namespaces) == 0) { 43 if (false === self::$initialized) { 44 // do not use __static() because we want to load the code only when 45 // it is really required 46 stubClassLoader::load('net.stubbles.util.ext.stubPhpToolsClassLoader'); 47 $patClassLoader = new stubPhpToolsClassLoader(stubRegistry::getConfig('net.php-tools.path', stubConfig::getLibPath() . '/pat')); 48 stubClassLoader::registerForeignClassLoader($patClassLoader); 49 stubClassLoader::load('net.php-tools.patErrorManager'); 50 stubClassLoader::load('net.php-tools.patTemplate'); 51 self::$initialized = true; 52 } 53 54 if (count($namespaces) === 0) { 50 55 $namespaces = array('patTemplate'); 51 56 } 52 57 53 if (isset($options['componentExtension']) == false) {58 if (isset($options['componentExtension']) === false) { 54 59 $options['componentExtension'] = '.tmpl'; 55 60 }
