/** * @return array|string */ public static function processPost() { if ($_SERVER['REQUEST_METHOD'] != 'POST') { return 'ERROR: Invalid request!'; } if (!isset($_POST['taoform'])) { return 'ERROR: Form not defined!'; } $name = trim($_POST['taoform']); $form = \TAO::form($name); if (!$form) { return 'ERROR: Unknown form!'; } return $form->process(); }