phpbb\install\helper\iohandler\iohandler_interface::get_input PHP Method

get_input() public method

Returns input variable
public get_input ( string $name, mixed $default, boolean $multibyte = false ) : 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.
$multibyte boolean If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters Default is false, causing all bytes outside the ASCII range (0-127) to be replaced with question marks
return mixed Value of the input variable
    public function get_input($name, $default, $multibyte = false);

Usage Example

Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function run()
 {
     if (!$this->iohandler->get_input('submit_continue_file_update', false)) {
         // Handle merge conflicts
         $merge_conflicts = $this->installer_config->get('merge_conflict_list', array());
         // Create archive for merge conflicts
         if (!empty($merge_conflicts)) {
             foreach ($merge_conflicts as $filename) {
                 $this->file_updater->create_new_file($filename, base64_decode($this->cache->get('_file_' . md5($filename))), true);
             }
             // Render download box
             $this->iohandler->add_download_link('phpbb_installer_update_conflict_download', 'DOWNLOAD_CONFLICTS', 'DOWNLOAD_CONFLICTS_EXPLAIN');
         }
         $this->file_updater->close();
         // Render update file statuses
         $file_update_info = $this->installer_config->get('update_files', array());
         $file_status = array('deleted' => !isset($file_update_info['delete']) ? array() : $file_update_info['delete'], 'new' => !isset($file_update_info['new']) ? array() : $file_update_info['new'], 'conflict' => $this->installer_config->get('merge_conflict_list', array()), 'modified' => !isset($file_update_info['update_with_diff']) ? array() : $file_update_info['update_with_diff'], 'not_modified' => !isset($file_update_info['update_without_diff']) ? array() : $file_update_info['update_without_diff']);
         $this->iohandler->render_update_file_status($file_status);
         // Add form to continue update
         $this->iohandler->add_user_form_group('UPDATE_CONTINUE_FILE_UPDATE', array('submit_continue_file_update' => array('label' => 'UPDATE_CONTINUE_FILE_UPDATE', 'type' => 'submit')));
         // Show results to the user
         $this->iohandler->send_response();
         throw new user_interaction_required_exception();
     } else {
         // Remove archive
         $this->filesystem->remove($this->installer_config->get('update_file_conflict_archive', null));
         $this->installer_config->set('update_file_conflict_archive', null);
     }
 }
All Usage Examples Of phpbb\install\helper\iohandler\iohandler_interface::get_input