value = $value; } function render () { $value = $this->value; if ($value === NULL) return 'NULL'; switch (get_type ($value)) { case TYPE_STRING: return '\'' . addslashes ($value) . '\''; case TYPE_DATE: return strftime ('\'%Y-%m-%d\'', $value->getTimestamp ()); case TYPE_TIME: return strftime ('\'%T\'', $value->getTimestamp ()); case TYPE_DATE_TIME: return strftime ('\'%Y-%m-%d %T\'', $value->getTimestamp ()); case TYPE_BOOLEAN: return ($value) ? 'TRUE' : 'FALSE'; default: return $value; } } } ?>