+
+ public function setDate($date)
+ {
+ if ($date === null) {
+ $this->date = date('Y-m-d');
+ } else {
+ $dt = new \DateTime($date);
+ $this->date = $dt->format('Y-m-d');
+ }
+ }
+
+ public function get($varname, $default = '')
+ {
+ if (!isset($this->$varname) || $this->$varname == '') {
+ return $default;
+ }
+ return $this->$varname;
+ }