Allow Parameters For Formatter


Extending the formatter to something like:

[size=2]public function format($value,$type)[/size]



        if(is_array($type)) {





        if(method_exists($this,$method)) {

            if($params===null) {

                return $this->$method($value);

            } else {

                return $this->$method($value,$params);


        } else {

            throw new CException(Yii::t('yii','Unknown type "{type}".',array('{type}'=>$type)));



Would make formating somewhat more flexible by enabling parameters towards the formatter (such as the width of a field, format of a date, images to be used, …).

[I know: I can currently define my own formatter and apply this - something I already do]