Changeset 280
- Timestamp:
- 02/21/07 15:19:14 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/memphis/stubMemphisPageProcessor.php
r279 r280 7 7 * @subpackage websites_memphis 8 8 */ 9 stubClassLoader::load('net.stubbles.websites.processors.stub Processor',9 stubClassLoader::load('net.stubbles.websites.processors.stubAbstractProcessor', 10 10 'net.stubbles.ipo.response.stubBaseResponse' 11 11 ); … … 16 16 * @subpackage websites_memphis 17 17 */ 18 class stubMemphisPageProcessor extends stub BaseObject implements stubProcessor18 class stubMemphisPageProcessor extends stubAbstractProcessor 19 19 { 20 /**21 * the request22 *23 * @var stubRequest24 */25 protected $request;26 /**27 * current session28 *29 * @var stubSession30 */31 protected $session;32 /**33 * the created response34 *35 * @var stubResponse36 */37 protected $response;38 /**39 * the factory that creates the page instance40 *41 * @var stubPageFactory42 */43 protected $pageFactory;44 45 20 /** 46 21 * constructor … … 52 27 public function __construct(stubRequest $request, stubSession $session, stubPageFactory $pageFactory) 53 28 { 54 $this->request = $request; 55 $this->session = $session; 56 $this->pageFactory = $pageFactory; 57 $this->response = new stubBaseResponse(); 29 parent::__construct($request, $session, $pageFactory); 30 $this->response = new stubBaseResponse(); 58 31 } 59 32 60 33 /** 61 * processes the request34 * does the real processing 62 35 * 63 36 * @return stubProcessor 64 37 */ 65 p ublic function process()38 protected function doProcess() 66 39 { 67 40 if ($this->request->hasValue('page') == true) { … … 85 58 $element->process($this->request, $this->session, $this->response); 86 59 } 87 88 return $this;89 }90 91 /**92 * returns the created response93 *94 * @return stubResponse95 */96 public function getResponse()97 {98 return $this->response;99 60 } 100 61 } trunk/src/main/php/net/stubbles/websites/xml/stubXMLProcessor.php
r279 r280 7 7 * @subpackage websites_xml 8 8 */ 9 stubClassLoader::load('net.stubbles.websites.processors.stub Processor',9 stubClassLoader::load('net.stubbles.websites.processors.stubAbstractProcessor', 10 10 'net.stubbles.ipo.response.stubBaseResponse', 11 11 'net.stubbles.util.validators.stubRegexValidator', … … 21 21 * stubPage into the stubXMLPagePostInterceptor 22 22 */ 23 class stubXMLProcessor extends stub BaseObject implements stubProcessor23 class stubXMLProcessor extends stubAbstractProcessor 24 24 { 25 /**26 * the request27 *28 * @var stubRequest29 */30 protected $request;31 /**32 * current session33 *34 * @var stubSession35 */36 protected $session;37 /**38 * the created response39 *40 * @var stubResponse41 */42 protected $response;43 /**44 * the page factory to use to read the page configuration45 *46 * @var stubPageFactory47 */48 protected $pageFactory;49 50 25 /** 51 26 * constructor … … 57 32 public function __construct(stubRequest $request, stubSession $session, stubPageFactory $pageFactory) 58 33 { 59 $this->request = $request; 60 $this->session = $session; 61 $this->pageFactory = $pageFactory; 62 $this->response = new stubBaseResponse(); 34 parent::__construct($request, $session, $pageFactory); 35 $this->response = new stubBaseResponse(); 63 36 } 64 37 65 38 /** 66 * processes the request39 * does the real processing 67 40 * 68 * @return stubProcessor 69 * @todo think about putting default values into the result document 41 * @todo think about putting default values into the result document 70 42 */ 71 p ublic function process()43 protected function doProcess() 72 44 { 73 45 if ($this->request->hasValue('page') == true) { … … 92 64 $xmlStreamWriter->writeEndElement(); // end document 93 65 $this->response->replaceData($xmlStreamWriter->asXML()); 94 95 return $this;96 66 } 97 67 98 /**99 * returns the created response100 *101 * @return stubResponse102 */103 public function getResponse()104 {105 return $this->response;106 }107 108 68 /** 109 69 * returns a xml stream writer
