Changeset 1632
- Timestamp:
- 06/19/08 11:00:48 (3 months ago)
- Files:
-
- trunk/projects (added)
- trunk/projects/dist (added)
- trunk/projects/dist/cache (moved) (moved from trunk/cache)
- trunk/projects/dist/config (moved) (moved from trunk/config)
- trunk/projects/dist/config/php/config-dist.php (modified) (4 diffs)
- trunk/projects/dist/config/php/config.php (modified) (4 diffs)
- trunk/projects/dist/docroot (moved) (moved from trunk/docroot)
- trunk/projects/dist/log (moved) (moved from trunk/log)
- trunk/projects/dist/pages (moved) (moved from trunk/pages)
- trunk/projects/examples (moved) (moved from trunk/examples)
- trunk/projects/examples/config/php/config.php (modified) (4 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessorResolver.php (modified) (3 diffs)
- trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolver.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/websites/stubFrontController.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/projects/dist/config/php/config-dist.php
r930 r1632 41 41 */ 42 42 private static $pagePath = null; 43 /** 44 * path to common files 45 * 46 * @var string 47 */ 48 private static $commonPath = null; 43 49 44 50 /** … … 52 58 { 53 59 if (null == self::$libPath) { 54 self::$libPath = realpath(dirname(__FILE__) . '/../../ lib');60 self::$libPath = realpath(dirname(__FILE__) . '/../../../../lib'); 55 61 } 56 62 … … 68 74 { 69 75 if (null == self::$sourcePath) { 70 self::$sourcePath = realpath(dirname(__FILE__) . '/../../ src/main');76 self::$sourcePath = realpath(dirname(__FILE__) . '/../../../../src/main'); 71 77 } 72 78 … … 139 145 140 146 /** 147 * this method should return the path to the common directory 148 * 149 * @return string 150 */ 151 public static function getCommonPath() 152 { 153 if (null == self::$commonPath) { 154 self::$commonPath = realpath(dirname(__FILE__) . '/../../projects/common'); 155 } 156 157 return self::$commonPath; 158 } 159 160 /** 141 161 * switch to use star files or not 142 162 * trunk/projects/dist/config/php/config.php
r930 r1632 41 41 */ 42 42 private static $pagePath = null; 43 /** 44 * path to common files 45 * 46 * @var string 47 */ 48 private static $commonPath = null; 43 49 44 50 /** … … 52 58 { 53 59 if (null == self::$libPath) { 54 self::$libPath = realpath(dirname(__FILE__) . '/../../ lib');60 self::$libPath = realpath(dirname(__FILE__) . '/../../../../lib'); 55 61 } 56 62 … … 68 74 { 69 75 if (null == self::$sourcePath) { 70 self::$sourcePath = realpath(dirname(__FILE__) . '/../../ src/main');76 self::$sourcePath = realpath(dirname(__FILE__) . '/../../../../src/main'); 71 77 } 72 78 … … 139 145 140 146 /** 147 * this method should return the path to the common directory 148 * 149 * @return string 150 */ 151 public static function getCommonPath() 152 { 153 if (null == self::$commonPath) { 154 self::$commonPath = realpath(dirname(__FILE__) . '/../../projects/common'); 155 } 156 157 return self::$commonPath; 158 } 159 160 /** 141 161 * switch to use star files or not 142 162 * trunk/projects/examples/config/php/config.php
r930 r1632 42 42 */ 43 43 private static $pagePath = null; 44 /** 45 * path to common files 46 * 47 * @var string 48 */ 49 private static $commonPath = null; 44 50 45 51 /** … … 53 59 { 54 60 if (null == self::$libPath) { 55 self::$libPath = realpath(dirname(__FILE__) . '/../../../ lib');61 self::$libPath = realpath(dirname(__FILE__) . '/../../../../lib'); 56 62 } 57 63 … … 69 75 { 70 76 if (null == self::$sourcePath) { 71 self::$sourcePath = realpath(dirname(__FILE__) . '/../../../ src/main');77 self::$sourcePath = realpath(dirname(__FILE__) . '/../../../../src/main'); 72 78 } 73 79 … … 140 146 141 147 /** 148 * this method should return the path to the common directory 149 * 150 * @return string 151 */ 152 public static function getCommonPath() 153 { 154 if (null == self::$commonPath) { 155 self::$commonPath = realpath(dirname(__FILE__) . '/../../projects/common'); 156 } 157 158 return self::$commonPath; 159 } 160 161 /** 142 162 * switch to use star files or not 143 163 * trunk/src/main/php/net/stubbles/websites/processors/stubAbstractProcessorResolver.php
r1447 r1632 46 46 47 47 $this->configure($processor); 48 $this->handlePageBasedProcessor($processor);49 48 return $processor; 50 49 } … … 68 67 69 68 /** 70 * helpermethod to handle page based processors69 * method to handle page based processors 71 70 * 72 71 * @param stubProcessor $processor … … 74 73 * @throws stubRuntimeException 75 74 */ 76 p rotected function handlePageBasedProcessor(stubProcessor $processor)75 public function selectPage(stubProcessor $processor) 77 76 { 78 77 if (($processor instanceof stubPageBasedProcessor) === false) { trunk/src/main/php/net/stubbles/websites/processors/stubProcessorResolver.php
r1445 r1632 29 29 */ 30 30 public function resolve(stubRequest $request, stubSession $session, stubResponse $response); 31 32 /** 33 * method to handle page based processors 34 * 35 * @param stubProcessor $processor 36 * @throws stubConfigurationException 37 * @throws stubRuntimeException 38 */ 39 public function selectPage(stubProcessor $processor); 31 40 } 32 41 ?> trunk/src/main/php/net/stubbles/websites/stubFrontController.php
r1534 r1632 123 123 $processorResolverFactory = $this->websiteInitializer->getProcessorResolverFactory(); 124 124 $processorResolverFactory->init(); 125 $processor = $processorResolverFactory->getResolver()->resolve($this->request, $this->session, $this->response); 126 if ($processor->forceSSL() === true && $processor->isSSL() === false) { 127 $this->response->addHeader('Location', 'https://' . $this->request->getURI()); 128 $this->request->cancel(); 129 $this->response->send(); 130 return; 131 } 132 125 $resolver = $processorResolverFactory->getResolver(); 126 $processor = $resolver->resolve($this->request, $this->session, $this->response); 133 127 $interceptorInitializer = $this->websiteInitializer->getInterceptorInitializer(); 134 128 $interceptorInitializer->setDescriptor($processor->getInterceptorDescriptor()); … … 140 134 return; 141 135 } 136 } 137 138 $resolver->selectPage($processor); 139 if ($processor->forceSSL() === true && $processor->isSSL() === false) { 140 $this->response->addHeader('Location', 'https://' . $this->request->getURI()); 141 $this->request->cancel(); 142 $this->response->send(); 143 return; 142 144 } 143 145
