Subject: | Here is the class with some errors... |
Summary: | Package rating comment |
Messages: | 1 |
Author: | Ionut G |
Date: | 2012-01-15 13:18:09 |
|
|
|
Ionut G rated this package as follows:
Utility: | Sufficient |
Consistency: | Sufficient |
|
Ionut G - 2012-01-15 13:18:09
Here is the class with some errors corrected.
class html_dner {
function __construct($element, $attrs = array(), $testo = ""){
$this->attributi = "";
foreach($attrs as $key => $value)
$this->attributi .= " ${key}=\"${value}\"";
$this->tag = $element;
$this->testo = $testo;
}
function addAttr($key, $value) {
$this->attributi .= " ${key}=\"${value}\"";
}
function setText($testo) {
$this->testo = $testo;
}
public function output(){
return "<$this->tag$this->attributi>$this->testo</$this->tag>";
}
}
|