IImportSource
in
Tags
Table of Contents
Constants
- PATH_USER = 'user.json'
Methods
- close() : void
- Called after import is complete
- copyToFolder() : void
- Copy files from the export to a Folder
- getFileAsStream() : resource
- Reads a file from the export as a stream
- getFileContents() : string
- Reads a file from the export
- getFolderListing() : array<string|int, mixed>
- List the files of a folder
- getMigratorVersion() : int|null
- getMigratorVersions() : array<string, int>
- getOriginalUid() : string
- Get original uid of the imported account
- pathExists() : bool
- Test if a path exists, which may be a file or a folder
Constants
PATH_USER
public
mixed
PATH_USER
= 'user.json'
Tags
Methods
close()
Called after import is complete
public
close() : void
Tags
copyToFolder()
Copy files from the export to a Folder
public
copyToFolder(Folder $destination, string $sourcePath) : void
Folder $destination folder to copy into string $sourcePath path in the export archive
Parameters
- $destination : Folder
- $sourcePath : string
Tags
getFileAsStream()
Reads a file from the export as a stream
public
getFileAsStream(string $path) : resource
Parameters
- $path : string
-
Full path to the file in the export archive.
Tags
Return values
resource —A stream resource to read from to get the file content.
getFileContents()
Reads a file from the export
public
getFileContents(string $path) : string
Parameters
- $path : string
-
Full path to the file in the export archive.
Tags
Return values
string —The full content of the file.
getFolderListing()
List the files of a folder
public
getFolderListing(string $path) : array<string|int, mixed>
Parameters
- $path : string
-
Full path to the folder in the export archive.
Tags
Return values
array<string|int, mixed> —The list of files.
getMigratorVersion()
public
getMigratorVersion(string $migrator) : int|null
Parameters
- $migrator : string
-
Migrator id (as returned by IMigrator::getId)
Tags
Return values
int|null —Version for this migrator from the export archive. Null means migrator missing.
getMigratorVersions()
public
getMigratorVersions() : array<string, int>
Tags
Return values
array<string, int> —Migrators and their versions from the export archive.
getOriginalUid()
Get original uid of the imported account
public
getOriginalUid() : string
Tags
Return values
stringpathExists()
Test if a path exists, which may be a file or a folder
public
pathExists(string $path) : bool
Parameters
- $path : string