Function Hook_import_mybb->data_to_disk
Definitions
sources/hooks/modules/admin_import/mybb.php
- Convert a MyBB database file to a software uploaded file (stored on disk).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $data | string | No | No | required parameter | N/A | N/A | The file data |
| $filename | string | No | No | required parameter | N/A | N/A | The optimal filename |
| $sections | ID_TEXT | No | No | required parameter | N/A | N/A | The upload type (e.g. cns_photos) |
| $db | object | No | No | required parameter | N/A | N/A | The database connector to import from |
| $table_prefix | string | No | No | Blank (empty string) | N/A | N/A | The table prefix the target prefix is using |
| $output_filename | string | No | No | Blank (empty string) | N/A | N/A | The filename to output to |
Returns
- The URL
- Type: URLPATH
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Convert a MyBB database file to a software uploaded file (stored on disk).
*
* @param string $data The file data
* @param string $filename The optimal filename
* @param ID_TEXT $sections The upload type (e.g. cns_photos)
* @param object $db The database connector to import from
* @param string $table_prefix The table prefix the target prefix is using
* @param string $output_filename The filename to output to
* @return URLPATH The URL
*/
public function data_to_disk(string $data, string $filename, string $sections, object $db, string $table_prefix = '', string $output_filename = '') : string
* Convert a MyBB database file to a software uploaded file (stored on disk).
*
* @param string $data The file data
* @param string $filename The optimal filename
* @param ID_TEXT $sections The upload type (e.g. cns_photos)
* @param object $db The database connector to import from
* @param string $table_prefix The table prefix the target prefix is using
* @param string $output_filename The filename to output to
* @return URLPATH The URL
*/
public function data_to_disk(string $data, string $filename, string $sections, object $db, string $table_prefix = '', string $output_filename = '') : string

