Changeset 1714
- Timestamp:
- 07/16/08 18:26:30 (3 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/main/php/net/stubbles/xml/stubXMLXIncludeStreamWrapper.php
r1623 r1714 7 7 * @subpackage xml 8 8 */ 9 stubClassLoader::load('net::stubbles::lang::stubRegistry', 9 stubClassLoader::load('net::stubbles::lang::stubMode', 10 'net::stubbles::lang::stubRegistry', 10 11 'net::stubbles::lang::exceptions::stubFileNotFoundException', 11 12 'net::stubbles::lang::exceptions::stubIOException', … … 77 78 public static function register() 78 79 { 79 if (true == self::$registered) {80 if (true === self::$registered) { 80 81 return; 81 82 } 82 83 83 if (stream_wrapper_register('xinc', __CLASS__) == false) {84 if (stream_wrapper_register('xinc', __CLASS__) === false) { 84 85 throw new stubXMLException('A handler has already been registered for the xinc protocol.'); 85 86 } … … 107 108 { 108 109 self::$cachePath = $cachePath . '/xml/xinc'; 109 if (file_exists($cachePath) == false) {110 if (file_exists($cachePath) === false) { 110 111 if (!@mkdir($cachePath, stubRegistry::getConfig('net.stubbles.filemode', 0700), true)) { 111 112 throw new stubIOException("Can not create cache directory " . $cachePath . '.'); … … 137 138 { 138 139 $this->parsePath($path); 139 if (file_exists($this->cachedFileName) == false || $this->needsRefresh()== true) {140 if (file_exists($this->cachedFileName) === false || $this->needsRefresh() === true) { 140 141 $this->processFile(); 141 142 } … … 157 158 protected function needsRefresh() 158 159 { 160 if (stubMode::$CURRENT->isCacheEnabled() === false) { 161 return true; 162 } 163 159 164 if (filemtime($this->cachedFileName) > filemtime($this->fileName)) { 160 165 return false;
