phpbb\install\helper\iohandler\iohandler_interface::get_raw_input PHP Метод

get_raw_input() публичный Метод

Returns raw input variable
public get_raw_input ( string $name, mixed $default ) : mixed
$name string Name of the input variable to obtain
$default mixed A default value that is returned if the variable was not set. This function will always return a value of the same type as the default.
Результат mixed Value of the raw input variable
    public function get_raw_input($name, $default);

Usage Example

Пример #1
0
 /**
  * Process form data
  */
 protected function process_form()
 {
     // Collect database data
     $dbms = $this->io_handler->get_input('dbms', '');
     $dbhost = $this->io_handler->get_input('dbhost', '', true);
     $dbport = $this->io_handler->get_input('dbport', '');
     $dbuser = $this->io_handler->get_input('dbuser', '');
     $dbpasswd = $this->io_handler->get_raw_input('dbpasswd', '');
     $dbname = $this->io_handler->get_input('dbname', '');
     $table_prefix = $this->io_handler->get_input('table_prefix', '');
     // Check database data
     $user_data_vaild = $this->check_database_data($dbms, $dbhost, $dbport, $dbuser, $dbpasswd, $dbname, $table_prefix);
     // Save database data if it is correct
     if ($user_data_vaild) {
         $this->install_config->set('dbms', $dbms);
         $this->install_config->set('dbhost', $dbhost);
         $this->install_config->set('dbport', $dbport);
         $this->install_config->set('dbuser', $dbuser);
         $this->install_config->set('dbpasswd', $dbpasswd);
         $this->install_config->set('dbname', $dbname);
         $this->install_config->set('table_prefix', $table_prefix);
     } else {
         $this->request_form_data(true);
     }
 }