Changeset 1452

Show
Ignore:
Timestamp:
03/23/08 00:38:04 (5 months ago)
Author:
mikey
Message:

removed toString() implementations, should used basic one

Files:

Legend:

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

    r1301 r1452  
    287287 
    288288    /** 
    289      * return string representation of this variant 
    290      * 
    291      * @return  string 
    292      */ 
    293     public function __toString() 
    294     { 
    295         $return = ''; 
    296         foreach ($this->children as $child) { 
    297             if (strlen($return) > 0) { 
    298                 $return .= ','; 
    299             } 
    300              
    301             $return .= $child->__toString(); 
    302         } 
    303          
    304         return $this->name . '(' . $return . ')'; 
    305     } 
    306  
    307     /** 
    308289     * template method to hook into __sleep() 
    309290     * 
  • trunk/src/main/php/net/stubbles/websites/variantmanager/types/stubRandomVariant.php

    r1281 r1452  
    11<?php 
    22/** 
    3  * RandomVariant 
    4  *  
    5  * Is chosen randomly based on the weight defined 
    6  * in the configuration. 
     3 * A variant chosen randomly based on the weight defined in the configuration. 
    74 * 
    85 * @author      Niels Schelbach <niels@schlund.de> 
     
    1411stubClassLoader::load('net::stubbles::websites::variantmanager::types::stubAbstractVariant'); 
    1512/** 
    16  * RandomVariant 
    17  *  
    18  * Is chosen randomly based on the weight defined 
    19  * in the configuration. 
     13 * A variant chosen randomly based on the weight defined in the configuration. 
    2014 * 
    2115 * @package     stubbles 
     
    2923     * @var  int 
    3024     */ 
    31     private $weight          = 0; 
     25    private $weight       = 0; 
    3226    /** 
    3327     * the choosen sibling 
    3428     * 
    35      * @var  array<stubRandomVariant> 
     29     * @var  array<string,int> 
    3630     */ 
    3731    public static $random = array(); 
     
    147141        return $siblings; 
    148142    } 
    149  
    150     /** 
    151      * return string representation of this variant 
    152      * 
    153      * @return  string 
    154      */ 
    155     public function __toString() 
    156     { 
    157         return $this->name . '(Random weight=' . $this->weight . ')'; 
    158     } 
    159143} 
    160144?>