Changeset 379
- Timestamp:
- 03/14/07 21:00:03 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/variantmanager/stubVariantXJConfFactory.php
r378 r379 1 1 <?php 2 2 /** 3 * class to read the variant configuration and to create the variant map3 * Variant factory that reads variant configurations from xml files with XJConf. 4 4 * 5 5 * @author Stephan Schmidt <stephan.schmidt@schlund.de> … … 8 8 * @subpackage websites_variantmanager 9 9 */ 10 stubClassLoader::load('net.stubbles.util.xjconf.xjconf', 10 stubClassLoader::load('net.stubbles.websites.variantmanager.stubAbstractVariantFactory', 11 'net.stubbles.util.xjconf.xjconf', 11 12 'net.stubbles.stubFactory' 12 13 ); 13 14 /** 14 * class to read the variant configuration and to create the variant map15 * Variant factory that reads variant configurations from xml files with XJConf. 15 16 * 16 17 * @package stubbles 17 18 * @subpackage websites_variantmanager 18 19 */ 19 class stubVariantXJConfFactory extends stub BaseObject20 class stubVariantXJConfFactory extends stubAbstractVariantFactory 20 21 { 21 /**22 * map of available variants23 *24 * @var stubVariantsMap25 */26 private $variants;27 28 22 /** 29 23 * constructor … … 44 38 } 45 39 46 $this->variants = $xjconf->getConfigValue('variants'); 47 } 48 49 /** 50 * Get all defined variants in this configuration 51 * 52 * @return array<string> 53 */ 54 public function getVariantNames() 55 { 56 return $this->variants->getVariantNames(); 57 } 58 59 /** 60 * get a variant by its name 61 * 62 * @return stubVariant 63 */ 64 public function getVariantByName($variantName) 65 { 66 return $this->variants->getVariantByName($variantName); 67 } 68 69 /** 70 * return the variant map 71 * 72 * @return stubVariantsMap 73 */ 74 public function getVariantsMap() 75 { 76 return $this->variants; 40 $this->variantsMap = $xjconf->getConfigValue('variants'); 77 41 } 78 42 }
