+ /** nom du formulaire d'édition */
+ public function editor()
+ {
+ return null;
+ }
+
+ // }}}
+ // {{{ function answers()
+
+ /** automatic answers table for this type of validation */
+ public function answers()
+ {
+ static $answers_table;
+ if (!isset($answers_table[$this->type])) {
+ $r = XDB::query("SELECT id, title, answer FROM requests_answers WHERE category = {?}", $this->type);
+ $answers_table[$this->type] = $r->fetchAllAssoc($r);
+ }
+ return $answers_table[$this->type];
+ }
+
+ // }}}
+ // {{{ function id()
+
+ public function id()
+ {
+ return $this->uid . '_' . $this->type . '_' . $this->stamp;
+ }
+
+ // }}}
+ // {{{ function ruleText()
+
+ public function ruleText()
+ {
+ return str_replace('\'', '\\\'', $this->rules);
+ }
+
+ // }}}
+}