◆ __construct()
◆ getMigrateToNewObjectId()
ilFileObjectToStorageMigrationRunner::getMigrateToNewObjectId |
( |
| ) |
|
◆ getResource()
- Parameters
-
- Returns
- StorableResource
- Exceptions
-
Definition at line 169 of file class.ilFileObjectToStorageMigrationRunner.php.
References $d, and ilFileObjectToStorageDirectory\getObjectId().
Referenced by migrate().
172 $r = $this->database->queryF(
173 "SELECT rid FROM file_data WHERE file_id = %s",
177 $d = $this->database->fetchObject($r);
179 if (isset(
$d->rid) &&
$d->rid !==
'' && ($resource_identification = $this->storage_manager->find(
181 )) && $resource_identification !== null) {
182 $resource = $this->resource_builder->get($resource_identification);
184 $resource = $this->resource_builder->newBlank();
Interface StorageResource.
for($i=6; $i< 13; $i++) for($i=1; $i< 13; $i++) $d
◆ logMigratedFile()
ilFileObjectToStorageMigrationRunner::logMigratedFile |
( |
int |
$object_id, |
|
|
string |
$rid, |
|
|
int |
$version, |
|
|
string |
$old_path, |
|
|
string |
$status, |
|
|
string |
$movement_implementation, |
|
|
string |
$aditional_info = null |
|
) |
| |
|
private |
◆ migrate()
Definition at line 78 of file class.ilFileObjectToStorageMigrationRunner.php.
References Vendor\Package\$e, $movement_implementation, $version, getMigrateToNewObjectId(), ilFileObjectToStorageDirectory\getObjectId(), getResource(), ilFileObjectToStorageDirectory\getVersions(), logMigratedFile(), and ilFileObjectToStorageDirectory\tearDown().
88 $stream = Streams::ofResource(fopen(
$version->getPath(),
'rb'));
98 $this->resource_builder->appendFromStream(
102 $this->keep_originals
106 $aditional_info = $t->getMessage();
111 $resource->getIdentification()->serialize(),
119 $resource->addStakeholder($this->stakeholder);
121 $this->resource_builder->store($resource);
122 $this->database->manipulateF(
123 'UPDATE file_data SET rid = %s WHERE file_id = %s',
125 [$resource->getIdentification()->serialize(), $object_id]
129 $this->database->manipulateF(
130 'UPDATE file_data SET rid = %s WHERE file_id = %s',
132 [
'error', $object_id]
Class FileNamePolicyException.
getResource(ilFileObjectToStorageDirectory $item)
string $movement_implementation
logMigratedFile(int $object_id, string $rid, int $version, string $old_path, string $status, string $movement_implementation, string $aditional_info=null)
getMigrateToNewObjectId()
Class ilFileObjectToStorageInfoResolver.
◆ setMigrateToNewObjectId()
ilFileObjectToStorageMigrationRunner::setMigrateToNewObjectId |
( |
?int |
$migrate_to_new_object_id | ) |
|
◆ $consumer_factory
◆ $database
◆ $file_system
Filesystem ilFileObjectToStorageMigrationRunner::$file_system |
|
protected |
◆ $keep_originals
bool ilFileObjectToStorageMigrationRunner::$keep_originals = false |
|
protected |
◆ $migrate_to_new_object_id
int ilFileObjectToStorageMigrationRunner::$migrate_to_new_object_id = null |
|
protected |
◆ $migration_log_handle
ilFileObjectToStorageMigrationRunner::$migration_log_handle |
|
protected |
◆ $movement_implementation
string ilFileObjectToStorageMigrationRunner::$movement_implementation = '' |
|
protected |
◆ $resource_builder
◆ $stakeholder
◆ $storage_manager
Manager ilFileObjectToStorageMigrationRunner::$storage_manager |
|
protected |
The documentation for this class was generated from the following file: