Свойство | Тип | Описание | |
---|---|---|---|
$CurrentStep | Track what step of this process we're on. | ||
$Data | array | ||
$ErrorType | Error to return. | ||
$ImportPath | File location. | ||
$MaxStepTime | Max seconds to run a single step. | ||
$Timer | Used for timing various long running methods to break them up into pieces. |
Свойство | Тип | Описание | |
---|---|---|---|
$_MergeSteps | Method names in order they are called during a merge. | ||
$_OverwriteSteps | Method names in order they are called during a clean slate import from file. | ||
$_OverwriteStepsDb | Steps for importing from database. |
Метод | Описание | |
---|---|---|
__construct ( $ImportPath = '' ) | Set the import path. | |
addActivity ( ) : boolean | ||
assignOtherIDs ( ) : boolean | ||
assignUserIDs ( ) : boolean | ||
authenticateAdminUser ( ) : boolean | ||
customFinalization ( ) : boolean | ||
data ( $Key, null $Value = null ) : mixed | ||
defineIndexes ( ) : boolean | ||
defineTables ( ) : boolean | ||
deleteFiles ( ) | ||
deleteOverwriteTables ( ) | Remove the data from the appropriate tables when we are overwriting the forum. | |
deleteState ( ) | ||
fGetCSV2 ( $fp, string $Delim = ',', string $Quote = '"', string $Escape = "\" ) : array | ||
fromPost ( $Post ) | ||
generateSQL ( null $Value = null ) : mixed | ||
getCountSQL ( string $Aggregate, string $ParentTable, string $ChildTable, string $ParentColumnName = '', string $ChildColumnName = '', string $ParentJoinColumn = '', string $ChildJoinColumn = '' ) : Gdn_DataSet | Return SQL for updating a count. | |
getCustomImportModel ( ) | Get a custom import model based on the import's source. | |
getImportHeader ( null $fpin = null ) : array | mixed | string | ||
getPasswordHashMethod ( ) : mixed | string | ||
importExists ( string $Table, string $Column = '' ) : boolean | Checks to see of a table and/or column exists in the import data. | |
initialize ( ) : boolean | ||
insertPermissionTable ( ) : boolean | ||
insertTables ( ) : boolean | ||
insertUserTable ( ) : boolean | ||
isDbSource ( ) : boolean | string | ||
loadState ( ) | ||
loadTable ( $Tablename, $Path ) : boolean | ||
loadTableInsert ( string $Tablename, string $Path, boolean $skipHeader = true, integer $chunk = 100 ) : boolean | Import a table from a CSV using SQL insert statements. | |
loadTableType ( boolean $Save = true ) : boolean | mixed | string | ||
loadTables ( ) : boolean | ||
loadUserTable ( ) : boolean | ||
localInfileSupported ( ) : boolean | ||
overwrite ( string $Overwrite = '', string $Email = '', string $Password = '' ) : mixed | ||
parseInfoLine ( $Line ) : array | ||
processImportDb ( ) | Process the import tables from the database. | |
processImportFile ( ) : boolean | ||
query ( string $Sql, array $Parameters = null ) : Gdn_DataSet | Run a query, replacing database prefixes. | |
runStep ( integer $Step = 1 ) : mixed | Run the step in the import. | |
saveSQL ( $CurrentStep ) | ||
saveState ( ) | ||
setCategoryPermissionIDs ( ) | Set the category permissions based on the permission table. | |
setRoleDefaults ( ) | ||
stat ( $Key, null $Value = null, string $Op = 'set' ) : mixed | ||
steps ( ) : array | ||
tables ( string $TableName = '' ) : mixed | ||
toPost ( &$Post ) | ||
updateCounts ( ) : boolean | ||
verifyImport ( ) | Verify imported data. |
Метод | Описание | |
---|---|---|
_InsertTable ( $TableName, array $Sets = [] ) : boolean | integer | void | ||
_LoadTableLocalInfile ( $Tablename, $Path ) | ||
_LoadTableOnSameServer ( $Tablename, $Path ) | ||
_LoadTableWithInsert ( $Tablename, $Path ) : boolean | ||
_assignIDs ( $TableName, null $PrimaryKey = null, null $SecondaryKey = null ) : boolean | void | ||
_setCategoryPermissionIDs ( $Category, $PermissionID, $IDs ) | ||
backTick ( $Str ) : string |
protected _LoadTableLocalInfile ( $Tablename, $Path ) | ||
$Tablename | ||
$Path |
protected _LoadTableOnSameServer ( $Tablename, $Path ) | ||
$Tablename | ||
$Path |
protected _LoadTableWithInsert ( $Tablename, $Path ) : boolean | ||
$Tablename | ||
$Path | ||
Результат | boolean |
protected _setCategoryPermissionIDs ( $Category, $PermissionID, $IDs ) | ||
$Category | ||
$PermissionID | ||
$IDs |
public authenticateAdminUser ( ) : boolean | ||
Результат | boolean |
public deleteOverwriteTables ( ) |
public generateSQL ( null $Value = null ) : mixed | ||
$Value | null | |
Результат | mixed |
public getCountSQL ( string $Aggregate, string $ParentTable, string $ChildTable, string $ParentColumnName = '', string $ChildColumnName = '', string $ParentJoinColumn = '', string $ChildJoinColumn = '' ) : Gdn_DataSet | ||
$Aggregate | string | count, max, min, etc. |
$ParentTable | string | The name of the parent table. |
$ChildTable | string | The name of the child table |
$ParentColumnName | string | |
$ChildColumnName | string | |
$ParentJoinColumn | string | |
$ChildJoinColumn | string | |
Результат | Gdn_DataSet |
public getCustomImportModel ( ) |
public getPasswordHashMethod ( ) : mixed | string | ||
Результат | mixed | string |
public insertPermissionTable ( ) : boolean | ||
Результат | boolean |
public loadTableInsert ( string $Tablename, string $Path, boolean $skipHeader = true, integer $chunk = 100 ) : boolean | ||
$Tablename | string | The name of the table to import to. |
$Path | string | The path to the CSV. |
$skipHeader | boolean | Whether the CSV contains a header row. |
$chunk | integer | The number of records to chunk the imports to. |
Результат | boolean | Whether any records were found. |
public processImportDb ( ) |
public setCategoryPermissionIDs ( ) |
public $Timer |
protected $_MergeSteps |
protected $_OverwriteSteps |