class Importer (View source)

Constants

E_PHP_FILE_ERROR_DEFAULT

PHP error constants - these match those founds in $_FILES[$field]['error] if it exists.

E_PHP_FILE_EXCEEDS_UPLOAD_MAX_FILESIZE

E_PHP_FILE_EXCEEDS_HTML_MAX_FILE_SIZE

E_PHP_FILE_PARTIAL_UPLOAD

E_PHP_NO_FILE

E_FILE_INVALID_EXTENSION

concrete5 internal error constants.

E_FILE_INVALID

E_FILE_UNABLE_TO_STORE

E_FILE_INVALID_STORAGE_LOCATION

E_FILE_EXCEEDS_POST_MAX_FILE_SIZE

Properties

protected $rescanThumbnailsOnImport
protected $importProcessors

Methods

__construct()

No description

string
getErrorMessage(int $code)

Returns a text string explaining the error that was passed.

addImportProcessor(ProcessorInterface $processor)

No description

string
generatePrefix()

No description

number
import(string $pointer, string|bool $filename = false, File|FileFolder|bool $fr = false)

Imports a local file into the system. The file must be added to this path somehow. That's what happens in tools/files/importers/.

number
importIncomingFile(string $filename, File|FileFolder|bool $fr = false)

Imports a file in the default file storage location's incoming directory.

setRescanThumbnailsOnImport($refresh)

No description

Details

__construct()

No description

string getErrorMessage(int $code)

Returns a text string explaining the error that was passed.

Parameters

int $code

Return Value

string

addImportProcessor(ProcessorInterface $processor)

No description

Parameters

ProcessorInterface $processor

string generatePrefix()

No description

Return Value

string

number import(string $pointer, string|bool $filename = false, File|FileFolder|bool $fr = false)

Imports a local file into the system. The file must be added to this path somehow. That's what happens in tools/files/importers/.

If a $fr (FileRecord) object is passed, we assign the newly imported FileVersion object to that File. If not, we make a new filerecord.

Parameters

string $pointer

path to file

string|bool $filename
File|FileFolder|bool $fr

Return Value

number

Error Code | \Concrete\Core\EntiFile\Version

number importIncomingFile(string $filename, File|FileFolder|bool $fr = false)

Imports a file in the default file storage location's incoming directory.

Parameters

string $filename
File|FileFolder|bool $fr

Return Value

number

Error Code | \Concrete\Core\Entity\File\Version

setRescanThumbnailsOnImport($refresh)

No description

Parameters

$refresh