Exemple #1
0
 /**
  * フォームの開始タグ出力
  * @return
  */
 public function start()
 {
     $attr = FormManager::attr_format($this->attrs);
     $html = ["<form {$attr}>", $this->form_id, $this->form_mode, $this->csrf];
     echo join(PHP_EOL, $html);
 }
Exemple #2
0
 /**
  * 要素を出力する
  * @return
  */
 public function __toString()
 {
     $value = $this->getValue();
     $value = FormManager::escape($value);
     $attrs = FormManager::attr_format($this->attrs);
     switch ($this->mode) {
         case "input":
             return $this->makeInput($value, $attrs);
             break;
         case "confirm":
             return $this->makeConfirm($value, $attrs);
             break;
     }
 }