Show
Ignore:
Timestamp:
11/21/06 20:45:41 (2 years ago)
Author:
schst
Message:

New feature: It is now possible to use dynamic setter methods based on the value of an attribute of a tag.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/Color.php

    r27 r43  
    22/** 
    33 * example class 
    4  *  
     4 * 
    55 * @author  Stephan Schmidt <stephan.schmidt@schlund.de> 
    66 * @author  Frank Kleine <frank.kleine@schlund.de> 
     
    88/** 
    99 * example class 
    10  *  
     10 * 
    1111 * @package     XJConf 
    1212 * @subpackage  examples 
     
    5050     * @var  string  $name  name of the color 
    5151     */ 
    52     public function  __construct($name
     52    public function  __construct($name = null
    5353    { 
    5454        $this->name = $name; 
    5555    } 
    56      
     56 
    5757    /** 
    5858     * set the red part 
     
    6464        $this->red = $val; 
    6565    } 
    66      
     66 
    6767    /** 
    6868     * set the green part 
     
    7474        $this->green = $val; 
    7575    } 
    76      
     76 
    7777    /** 
    7878     * set the blue part 
     
    8484        $this->blue = $val; 
    8585    } 
    86      
     86 
    8787    /** 
    8888     * set the title of the color 
     
    9494        $this->colorTitle = $title; 
    9595    } 
    96      
     96 
    9797    /** 
    9898     * get the rgb value as hex 
     
    104104        return '#' . dechex($this->red) . dechex($this->green) . dechex($this->blue); 
    105105    } 
    106      
     106 
    107107    /** 
    108108     * return the name of the color 
     
    114114        return $this->name; 
    115115    } 
    116      
     116 
    117117    /** 
    118118     * return the title of the color 
     
    124124        return $this->colorTitle; 
    125125    } 
    126      
     126 
    127127    /** 
    128128     * returns string representation 
    129      *  
     129     * 
    130130     * @return  string 
    131131     */