Changeset 1710
- Timestamp:
- 07/16/08 16:13:43 (2 months ago)
- Files:
-
- framework/trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLAbstractCallback.php (added)
- framework/trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLImageDimensions.php (modified) (5 diffs)
- framework/trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLRequestParams.php (modified) (4 diffs)
- framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLRequestParamsTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
framework/trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLImageDimensions.php
r1296 r1710 7 7 * @subpackage xml_xsl_util 8 8 */ 9 stubClassLoader::load('net::stubbles::xml:: stubXMLStreamWriter',10 'net::stubbles::xml::xsl:: stubXSLCallbackException'9 stubClassLoader::load('net::stubbles::xml::xsl::stubXSLCallbackException', 10 'net::stubbles::xml::xsl::util::stubXSLAbstractCallback' 11 11 ); 12 12 /** … … 16 16 * @subpackage xml_xsl_util 17 17 */ 18 class stubXSLImageDimensions extends stub BaseObject18 class stubXSLImageDimensions extends stubXSLAbstractCallback 19 19 { 20 20 /** … … 28 28 ); 29 29 /** 30 * the stream writer to use31 *32 * @var stubXMLStreamWriter33 */34 protected $xmlStreamWriter;35 /**36 30 * path to images 37 31 * … … 39 33 */ 40 34 protected $path = null; 41 42 /**43 * constructor44 *45 * @param stubXMLStreamWriter $xmlStreamWriter the xml stream writer to create the document with46 * @Inject47 */48 public function __construct(stubXMLStreamWriter $xmlStreamWriter)49 {50 $this->xmlStreamWriter = $xmlStreamWriter;51 }52 35 53 36 /** … … 73 56 public function getImageDimensions($imageFile) 74 57 { 75 if (is_array($imageFile) == true) { 76 $imageFileName = $imageFile[0]->value; 77 } else { 78 $imageFileName = $imageFile; 79 } 80 58 $imageFileName = $this->parseValue($imageFile); 81 59 if (null !== $this->path) { 82 60 $imageFileName = $this->path . '/' . $imageFileName; framework/trunk/src/main/php/net/stubbles/xml/xsl/util/stubXSLRequestParams.php
r1609 r1710 9 9 stubClassLoader::load('net::stubbles::ipo::request::stubRequest', 10 10 'net::stubbles::ipo::request::validator::stubPassThruValidator', 11 'net::stubbles::xml:: stubXMLStreamWriter'11 'net::stubbles::xml::xsl::util::stubXSLAbstractCallback' 12 12 ); 13 13 /** … … 17 17 * @subpackage xml_xsl_util 18 18 */ 19 class stubXSLRequestParams extends stub BaseObject19 class stubXSLRequestParams extends stubXSLAbstractCallback 20 20 { 21 /**22 * the stream writer to use23 *24 * @var stubXMLStreamWriter25 */26 protected $xmlStreamWriter;27 21 /** 28 22 * request instance … … 33 27 34 28 /** 35 * constructor29 * sets the request instance to be used 36 30 * 37 * @param stubXMLStreamWriter $xmlStreamWriter xml stream writer to create the document with 38 * @param stubRequest $request request instance 31 * @param stubRequest $request request instance 39 32 * @Inject 40 33 */ 41 public function __construct(stubXMLStreamWriter $xmlStreamWriter,stubRequest $request)34 public function setRequest(stubRequest $request) 42 35 { 43 $this->xmlStreamWriter = $xmlStreamWriter; 44 $this->request = $request; 36 $this->request = $request; 45 37 } 46 38 … … 62 54 ); 63 55 64 $doc = $this->xmlStreamWriter->asDom(); 65 $this->xmlStreamWriter->clear(); 66 return $doc; 56 return $this->createDomDocument(); 67 57 } 68 58 framework/trunk/src/test/php/net/stubbles/xml/xsl/util/stubXSLRequestParamsTestCase.php
r1703 r1710 46 46 $this->mockXMLStreamWriter = new stubDomXMLStreamWriter(); 47 47 $this->mockRequest = $this->getMock('stubRequest'); 48 $this->xslRequestParams = new stubXSLRequestParams($this->mockXMLStreamWriter, $this->mockRequest); 48 $this->xslRequestParams = new stubXSLRequestParams($this->mockXMLStreamWriter); 49 $this->xslRequestParams->setRequest($this->mockRequest); 49 50 } 50 51
