Changeset 379

Show
Ignore:
Timestamp:
03/14/07 21:00:03 (1 year ago)
Author:
mikey
Message:

splitted net.stubbles.websites.variantmanager.stubVariantXJConfFactory into interface net.stubbles.websites.variantmanager.stubVariantFactory and abstract net.stubbles.websites.variantmanager.stubAbstractVariantFactory

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/variantmanager/stubVariantXJConfFactory.php

    r378 r379  
    11<?php 
    22/** 
    3  * class to read the variant configuration and to create the variant map 
     3 * Variant factory that reads variant configurations from xml files with XJConf. 
    44 *  
    55 * @author      Stephan Schmidt <stephan.schmidt@schlund.de> 
     
    88 * @subpackage  websites_variantmanager 
    99 */ 
    10 stubClassLoader::load('net.stubbles.util.xjconf.xjconf', 
     10stubClassLoader::load('net.stubbles.websites.variantmanager.stubAbstractVariantFactory', 
     11                      'net.stubbles.util.xjconf.xjconf', 
    1112                      'net.stubbles.stubFactory' 
    1213); 
    1314/** 
    14  * class to read the variant configuration and to create the variant map 
     15 * Variant factory that reads variant configurations from xml files with XJConf. 
    1516 *  
    1617 * @package     stubbles 
    1718 * @subpackage  websites_variantmanager 
    1819 */ 
    19 class stubVariantXJConfFactory extends stubBaseObject 
     20class stubVariantXJConfFactory extends stubAbstractVariantFactory 
    2021{ 
    21     /** 
    22      * map of available variants 
    23      * 
    24      * @var  stubVariantsMap 
    25      */ 
    26     private $variants; 
    27      
    2822    /** 
    2923     * constructor 
     
    4438        } 
    4539         
    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'); 
    7741    } 
    7842}