ILIAS
Release_4_4_x_branch Revision 61816
|
Public Member Functions | |
__construct ($a_id=0, $a_call_by_reference=true) | |
Constructor public. | |
initType () | |
createProperties ($a_upload=false, $a_prevent_meta_data_creation=false) | |
The basic properties of a file object are stored in table object_data. | |
getDirectory ($a_version=0) | |
createDirectory () | |
raiseUploadError ($a_raise=true) | |
getUploadFile ($a_upload_file, $a_filename, $a_prevent_preview=false) | |
replaceFile ($a_upload_file, $a_filename) | |
replace file with new file | |
addFileVersion ($a_upload_file, $a_filename) | |
copy ($a_source, $a_destination) | |
copy file | |
clearDataDirectory () | |
clear data directory | |
deleteVersions ($a_hist_entry_ids=null) | |
Deletes the specified history entries or all entries if no ids are specified. | |
setFileName ($a_name) | |
set filename | |
getFileName () | |
setFileType ($a_type) | |
getFileType () | |
setFileSize ($a_size) | |
getFileSize () | |
getDiskUsage () | |
Gets the disk usage of the object in bytes. | |
getFile ($a_hist_entry_id=null) | |
setVersion ($a_version) | |
getVersion () | |
setMode ($a_mode) | |
mode is object or filelist | |
getMode () | |
mode is object or filelist | |
_writeFileType ($a_id, $a_format) | |
_lookupFileName ($a_id) | |
_lookupFileSize ($a_id) | |
Lookups the file size of the file in bytes. | |
_lookupVersion ($a_id) | |
lookup version | |
determineFileSize ($a_hist_entry_id=null) | |
Determine File Size. | |
sendFile ($a_hist_entry_id=null) | |
getFileExtension () | |
Returns the extension of the file name converted to lower-case. | |
isInline () | |
Returns true, if this file should be displayed inline in a browser window. | |
isHidden () | |
Returns true, if this file should be hidden in the repository view. | |
guessFileType ($a_file="") | |
Guesses the file type based on the current values returned by getFileType() and getFileExtension(). | |
export ($a_target_dir) | |
export files of object to target directory note: target directory must be the export target directory, "/objects/il_<inst>_file_<file_id>/..." will be appended to this directory | |
_deleteAllUsages ($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") | |
static delete all usages of | |
_saveUsage ($a_file_id, $a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") | |
save usage | |
getUsages () | |
get all usages of file object | |
_getFilesOfObject ($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-") | |
get all files of an object | |
getXMLZip () | |
addNewsNotification ($a_lang_var) | |
initFileStorage () | |
init file storage object | |
storeUnzipedFile ($a_upload_file, $a_filename) | |
storeUnzipedFile | |
checkFileExtension ($new_filename, $new_title) | |
Check if the file extension does still exist after an update of the title. | |
getVersions ($version_ids=null) | |
Gets the file versions for this object. | |
getSpecificVersion ($version_id) | |
Gets a specific file version. | |
rollback ($version_id) | |
Makes the specified version the current one and returns theSummary of rollbackVersion. | |
compareVersions ($v1, $v2) | |
Compares two file versions. | |
parseInfoParams ($entry) | |
Parses the info parameters ("info_params") of the specified history entry. | |
setRating ($a_value) | |
hasRating () | |
Public Member Functions inherited from ilObject2 | |
withReferences () | |
determines wehter objects are referenced or not (got ref ids or not) | |
read ($a_force_db=false) | |
Read data from db. | |
getId () | |
get object id public | |
setId ($a_id) | |
set object id public | |
setRefId ($a_id) | |
set reference id public | |
getRefId () | |
get reference id public | |
getType () | |
get object type public | |
setType ($a_type) | |
set object type public | |
getPresentationTitle () | |
get presentation title Normally same as title Overwritten for sessions | |
getTitle () | |
get object title public | |
getUntranslatedTitle () | |
get untranslated object title public | |
setTitle ($a_title) | |
set object title | |
getDescription () | |
get object description | |
setDescription ($a_desc) | |
set object description | |
getLongDescription () | |
get object long description (stored in object_description) | |
getImportId () | |
get import id | |
setImportId ($a_import_id) | |
set import id | |
getOwner () | |
get object owner | |
getOwnerName () | |
_lookupOwnerName ($a_owner_id) | |
lookup owner name for owner id | |
setOwner ($a_owner) | |
set object owner | |
getCreateDate () | |
get create date public | |
getLastUpdateDate () | |
get last update date public | |
setObjDataRecord ($a_record) | |
set object_data record (note: this method should only be called from the ilObjectFactory class) | |
create ($a_clone_mode=false) | |
update () | |
update object in db | |
MDUpdateListener ($a_element) | |
Meta data update listener. | |
createMetaData () | |
create meta data entry | |
updateMetaData () | |
update meta data entry | |
deleteMetaData () | |
delete meta data entry | |
updateOwner () | |
update owner of object in db | |
_getIdForImportId ($a_import_id) | |
get current object id for import id (static) | |
_lookupOwner ($a_id) | |
lookup object owner | |
_lookupLastUpdate ($a_id, $a_as_string=false) | |
lookup last update | |
_getLastUpdateOfObjects ($a_objs) | |
Get last update for a set of media objects. | |
_setDeletedDate ($a_ref_id) | |
only called in ilTree::saveSubTree | |
_resetDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_lookupDeletedDate ($a_ref_id) | |
only called in ilObjectGUI::insertSavedNodes | |
_writeTitle ($a_obj_id, $a_title) | |
write title to db (static) | |
_writeDescription ($a_obj_id, $a_desc) | |
write description to db (static) | |
_writeImportId ($a_obj_id, $a_import_id) | |
write import id to db (static) | |
_isInTrash ($a_ref_id) | |
checks wether object is in trash | |
_hasUntrashedReference ($a_obj_id) | |
checks wether an object has at least one reference that is not in trash | |
_getObjectsDataForType ($a_type, $a_omit_trash=false) | |
get all objects of a certain type | |
putInTree ($a_parent_ref) | |
maybe this method should be in tree object!? | |
setPermissions ($a_parent_ref) | |
set permissions of object | |
createReference () | |
creates reference for object | |
countReferences () | |
count references of object | |
delete () | |
delete object or referenced object (in the case of a referenced object, object data is only deleted if last reference is deleted) This function removes an object entirely from system!! | |
initDefaultRoles () | |
init default roles settings Purpose of this function is to create a local role folder and local roles, that are needed depending on the object type If you want to setup default local roles you MUST overwrite this method in derived object classes (see ilObjForum for an example) public | |
createRoleFolder () | |
creates a local role folder | |
notify ($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0) | |
notifys an object about an event occured Based on the event passed, each object may decide how it reacts. | |
setRegisterMode ($a_bool) | |
isUserRegistered ($a_user_id=0) | |
requireRegistration () | |
appendCopyInfo ($a_target_id, $a_copy_id) | |
Prepend Copy info if object with same name exists in that container. | |
cloneMetaData ($target_obj) | |
Copy meta data. | |
cloneObject ($a_target_id, $a_copy_id=null, $a_omit_tree=false) | |
Clone object permissions, put in tree ... | |
cloneDependencies ($a_target_id, $a_copy_id) | |
Clone object dependencies. | |
Public Member Functions inherited from ilObject | |
ilObject ($a_id=0, $a_reference=true) | |
Constructor public. | |
create () | |
create | |
applyDidacticTemplate ($a_tpl_id) | |
Apply template. | |
getHTMLDirectory () | |
_lookupCreationDate ($a_id) | |
Lookup creation date. |
Static Public Member Functions | |
static | _lookupAbsolutePath ($obj_id, $a_version=null) |
return absolute path for version | |
Static Public Member Functions inherited from ilObject2 | |
static | _lookupObjIdByImportId ($a_import_id) |
static | _getAllReferences ($a_id) |
get all reference ids of object | |
static | _lookupTitle ($a_id) |
lookup object title | |
static | _getIdsForTitle ($title, $type= '', $partialmatch=false) |
static | _lookupDescription ($a_id) |
lookup object description | |
static | _lookupObjId ($a_id) |
static | _lookupType ($a_id, $a_reference=false) |
lookup object type | |
static | _lookupObjectId ($a_ref_id) |
lookup object id | |
static | _exists ($a_id, $a_reference=false) |
static | _getObjectsByType ($a_obj_type="", $a_owner="") |
Get objects by type. | |
static | _prepareCloneSelection ($a_ref_ids, $new_type) |
static | _getIcon ($a_obj_id="", $a_size="big", $a_type="", $a_offline=false) |
Get icon for repository item. | |
Static Public Member Functions inherited from ilObject | |
static | setDeletedDates ($a_ref_ids) |
Set deleted date type $ilDB. | |
static | _exists ($a_id, $a_reference=false, $a_type=null) |
checks if an object exists in object_data | |
static | _prepareCloneSelection ($a_ref_ids, $new_type, $show_path=true) |
Prepare copy wizard object selection. | |
static | collectDeletionDependencies (&$deps, $a_ref_id, $a_obj_id, $a_type, $a_depth=0) |
Collect deletion dependencies. | |
static | getDeletionDependencies ($a_obj_id) |
Get deletion dependencies. | |
static | getLongDescriptions (array $a_obj_ids) |
Get long description data. | |
static | getAllOwnedRepositoryObjects ($a_user_id) |
Get all ids of objects user owns. | |
static | hasAutoRating ($a_type, $a_ref_id) |
Check if auto rating is active for parent group/course. |
Data Fields | |
$filename | |
$filetype | |
$filemaxsize = "20000000" | |
$raise_upload_error | |
$mode = "object" |
Protected Member Functions | |
doCreate ($a_upload=false, $a_prevent_meta_data_creation=false) | |
create object | |
doCreateMetaData () | |
create file object meta data | |
beforeMDUpdateListener ($a_element) | |
doMDUpdateListener ($a_element) | |
doRead () | |
read file properties | |
beforeUpdate () | |
doUpdate () | |
update file | |
doUpdateMetaData () | |
update meta data | |
doCloneObject ($a_new_obj, $a_target_id, $a_copy_id=0) | |
Clone. | |
beforeDelete () | |
doDelete () | |
updateWithVersion ($version) | |
Updates the file object with the specified file version. | |
createPreview ($force=false) | |
Creates a preview for the file object. | |
deletePreview () | |
Deletes the preview of the file object. | |
Protected Member Functions inherited from ilObject2 | |
doCreate () | |
beforeCreate () | |
beforeCreateMetaData () | |
beforeUpdateMetaData () | |
beforeCloneObject () |
Static Protected Member Functions | |
static | handleQuotaUpdate (ilObjFile $a_file) |
Protected Attributes | |
$rating |
Private Attributes | |
$file_storage = null |
Class ilObjFile.
Definition at line 18 of file class.ilObjFile.php.
ilObjFile::__construct | ( | $a_id = 0 , |
|
$a_call_by_reference = true |
|||
) |
Constructor public.
integer | reference_id or object_id |
boolean | treat the id as reference_id (true) or object_id (false) |
Reimplemented from ilObject2.
Definition at line 36 of file class.ilObjFile.php.
References ilObject2\getId(), and initFileStorage().
ilObjFile::_deleteAllUsages | ( | $a_type, | |
$a_id, | |||
$a_usage_hist_nr = 0 , |
|||
$a_usage_lang = "-" |
|||
) |
static delete all usages of
Definition at line 862 of file class.ilObjFile.php.
References $row, and handleQuotaUpdate().
Referenced by ilPCFileList\beforePageDelete(), and ilPCFileList\saveFileUsage().
ilObjFile::_getFilesOfObject | ( | $a_type, | |
$a_id, | |||
$a_usage_hist_nr = 0 , |
|||
$a_usage_lang = "-" |
|||
) |
get all files of an object
string | $a_type | object type (e.g. "lm:pg") |
int | $a_id | object id |
Definition at line 948 of file class.ilObjFile.php.
References $ret.
Referenced by ilPCFileList\afterPageUpdate(), ilCOPageHTMLExport\collectPageElements(), ilObjGlossary\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLGlossaryTerms(), ilObjContentObject\exportHTMLPages(), ilPageObject\getLastUpdateOfIncludedElements(), and ilCOPageExporter\getXmlExportHeadDependencies().
|
static |
return absolute path for version
Definition at line 1051 of file class.ilObjFile.php.
References $file_storage, $filename, _lookupFileName(), and _lookupVersion().
Referenced by ilContainerGUI\copyFile(), ilObjWorkspaceFolder\recurseFolder(), and ilObjFolder\recurseFolder().
ilObjFile::_lookupFileName | ( | $a_id | ) |
Definition at line 554 of file class.ilObjFile.php.
References $row, DB_FETCHMODE_OBJECT, and ilUtil\stripSlashes().
Referenced by _lookupAbsolutePath(), ilSCORM2004PageGUI\setDefaultLinkXml(), and ilFilePreviewRenderer\supports().
ilObjFile::_lookupFileSize | ( | $a_id | ) |
Lookups the file size of the file in bytes.
Definition at line 567 of file class.ilObjFile.php.
Referenced by ilPageObject\addFileSizes(), ilObjFileDAV\getContentLength(), and ilObjFileGUI\infoScreenForward().
ilObjFile::_lookupVersion | ( | $a_id | ) |
lookup version
Definition at line 576 of file class.ilObjFile.php.
Referenced by _lookupAbsolutePath().
ilObjFile::_saveUsage | ( | $a_file_id, | |
$a_type, | |||
$a_id, | |||
$a_usage_hist_nr = 0 , |
|||
$a_usage_lang = "-" |
|||
) |
save usage
Definition at line 896 of file class.ilObjFile.php.
References handleQuotaUpdate().
Referenced by ilPCFileList\saveFileUsage().
ilObjFile::_writeFileType | ( | $a_id, | |
$a_format | |||
) |
Definition at line 543 of file class.ilObjFile.php.
References $res.
Referenced by doMDUpdateListener().
ilObjFile::addFileVersion | ( | $a_upload_file, | |
$a_filename | |||
) |
Definition at line 250 of file class.ilObjFile.php.
References ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), getUploadFile(), and getVersion().
ilObjFile::addNewsNotification | ( | $a_lang_var | ) |
Definition at line 981 of file class.ilObjFile.php.
References $ilUser, ilObject2\getDescription(), ilObject2\getId(), ilObject2\getType(), isHidden(), NEWS_NOTICE, and NEWS_USERS.
Referenced by addFileVersion(), createProperties(), replaceFile(), and rollback().
|
protected |
Reimplemented from ilObject2.
Definition at line 794 of file class.ilObjFile.php.
References getUsages().
|
protected |
Reimplemented from ilObject2.
Definition at line 132 of file class.ilObjFile.php.
References ilObject\$title, checkFileExtension(), getFileName(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Reimplemented from ilObject2.
Definition at line 377 of file class.ilObjFile.php.
References getMode(), and ilObject2\updateMetaData().
ilObjFile::checkFileExtension | ( | $new_filename, | |
$new_title | |||
) |
Check if the file extension does still exist after an update of the title.
Definition at line 1069 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and getFileName().
Referenced by beforeMDUpdateListener(), and updateWithVersion().
ilObjFile::clearDataDirectory | ( | ) |
clear data directory
Definition at line 279 of file class.ilObjFile.php.
References createDirectory(), ilUtil\delDir(), and getDirectory().
Referenced by deleteVersions().
ilObjFile::compareVersions | ( | $v1, | |
$v2 | |||
) |
Compares two file versions.
array | $v1 | First file version to compare. |
array | $v2 | Second file version to compare. |
Definition at line 1234 of file class.ilObjFile.php.
ilObjFile::copy | ( | $a_source, | |
$a_destination | |||
) |
copy file
Definition at line 271 of file class.ilObjFile.php.
References getDirectory().
Referenced by rollback().
ilObjFile::createDirectory | ( | ) |
Definition at line 197 of file class.ilObjFile.php.
References getDirectory(), and ilUtil\makeDirParents().
Referenced by clearDataDirectory().
|
protected |
Creates a preview for the file object.
bool | $force | true, to force the creation of the preview; false, to create the preview only if the file is newer. |
Definition at line 1304 of file class.ilObjFile.php.
References getMode().
Referenced by addFileVersion(), getUploadFile(), replaceFile(), storeUnzipedFile(), and updateWithVersion().
ilObjFile::createProperties | ( | $a_upload = false , |
|
$a_prevent_meta_data_creation = false |
|||
) |
The basic properties of a file object are stored in table object_data.
This is not sufficient for a file object. Therefore we create additional properties in table file_data. This method has been put into a separate operation, to allow a WebDAV Null resource (class.ilObjNull.php) to become a file object.
Definition at line 73 of file class.ilObjFile.php.
References $_GET, $res, ilHistory\_createEntry(), ilNewsItem\_getDefaultVisibilityForRefId(), ilBlockSetting\_write(), addNewsNotification(), ilObject2\createMetaData(), getFileName(), getFileSize(), getFileType(), ilObject2\getId(), getMode(), and initFileStorage().
Referenced by doCreate().
|
protected |
Deletes the preview of the file object.
Definition at line 1317 of file class.ilObjFile.php.
References ilObject2\getId(), and getMode().
Referenced by doDelete().
ilObjFile::deleteVersions | ( | $a_hist_entry_ids = null | ) |
Deletes the specified history entries or all entries if no ids are specified.
array | $a_hist_entry_ids | The ids of the entries to delete or null to delete all entries |
Definition at line 290 of file class.ilObjFile.php.
References ilHistory\_removeEntriesForObject(), ilHistory\_removeEntryByHistoryID(), clearDataDirectory(), ilUtil\delDir(), getDirectory(), ilObject2\getId(), getVersion(), getVersions(), handleQuotaUpdate(), setVersion(), and updateWithVersion().
ilObjFile::determineFileSize | ( | $a_hist_entry_id = null | ) |
Determine File Size.
Definition at line 585 of file class.ilObjFile.php.
References $file, ilHistory\_getEntryByHistoryID(), getDirectory(), getFileName(), getVersion(), parseInfoParams(), and setFileSize().
Referenced by updateWithVersion().
|
protected |
Clone.
public
object | clone |
int | target id |
int | copy id |
Reimplemented from ilObject2.
Definition at line 759 of file class.ilObjFile.php.
References $query, $res, ilHistory\_copyEntriesForObject(), ilObject2\cloneMetaData(), ilPreview\copyPreviews(), getDirectory(), ilObject2\getId(), and ilUtil\rCopy().
|
protected |
create object
bool | upload mode (if enabled no entries in file_data will be done) |
Definition at line 58 of file class.ilObjFile.php.
References createProperties().
|
protected |
create file object meta data
Reimplemented from ilObject2.
Definition at line 119 of file class.ilObjFile.php.
References getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
|
protected |
Reimplemented from ilObject2.
Definition at line 807 of file class.ilObjFile.php.
References ilHistory\_removeEntriesForObject(), ilUtil\delDir(), ilObject2\deleteMetaData(), deletePreview(), getDirectory(), ilObject2\getId(), getMode(), and handleQuotaUpdate().
|
protected |
Reimplemented from ilObject2.
Definition at line 148 of file class.ilObjFile.php.
References ilObject\$id, _writeFileType(), ilObject2\getId(), ilObject2\getType(), and setFileType().
|
protected |
read file properties
Reimplemented from ilObject2.
Definition at line 359 of file class.ilObjFile.php.
References $row, DB_FETCHMODE_OBJECT, ilObject2\getId(), initFileStorage(), setFileName(), setFileSize(), setFileType(), setMode(), setRating(), and setVersion().
|
protected |
update file
Reimplemented from ilObject2.
Definition at line 391 of file class.ilObjFile.php.
References $ilLog, $res, getFileName(), getFileSize(), ilObject2\getId(), getMode(), getVersion(), handleQuotaUpdate(), and hasRating().
|
protected |
update meta data
Reimplemented from ilObject2.
Definition at line 414 of file class.ilObjFile.php.
References getFileSize(), getFileType(), ilObject2\getId(), and ilObject2\getType().
ilObjFile::export | ( | $a_target_dir | ) |
export files of object to target directory note: target directory must be the export target directory, "/objects/il_<inst>_file_<file_id>/..." will be appended to this directory
string | $a_target_dir | target directory |
Definition at line 844 of file class.ilObjFile.php.
References getDirectory(), ilObject2\getId(), getVersion(), ilUtil\makeDir(), and ilUtil\rCopy().
ilObjFile::getDirectory | ( | $a_version = 0 | ) |
Definition at line 178 of file class.ilObjFile.php.
References initFileStorage().
Referenced by clearDataDirectory(), copy(), createDirectory(), deleteVersions(), determineFileSize(), doCloneObject(), doDelete(), export(), getFile(), getUploadFile(), getXMLZip(), rollback(), sendFile(), and storeUnzipedFile().
ilObjFile::getDiskUsage | ( | ) |
Gets the disk usage of the object in bytes.
public
Reimplemented from ilObject.
Definition at line 482 of file class.ilObjFile.php.
References ilObjFileAccess\_lookupDiskUsage().
Referenced by handleQuotaUpdate().
ilObjFile::getFile | ( | $a_hist_entry_id = null | ) |
Definition at line 490 of file class.ilObjFile.php.
References $file, ilHistory\_getEntryByHistoryID(), getDirectory(), getFileName(), getVersion(), and parseInfoParams().
ilObjFile::getFileExtension | ( | ) |
Returns the extension of the file name converted to lower-case.
e.g. returns 'pdf' for 'document.pdf'.
Definition at line 669 of file class.ilObjFile.php.
References ilObjFileAccess\_getFileExtension(), and ilObject2\getTitle().
ilObjFile::getFileName | ( | ) |
Definition at line 449 of file class.ilObjFile.php.
References $filename.
Referenced by beforeMDUpdateListener(), checkFileExtension(), createProperties(), determineFileSize(), doUpdate(), getFile(), getXMLZip(), and sendFile().
ilObjFile::getFileSize | ( | ) |
Definition at line 472 of file class.ilObjFile.php.
Referenced by createProperties(), doCreateMetaData(), doUpdate(), and doUpdateMetaData().
ilObjFile::getFileType | ( | ) |
Definition at line 462 of file class.ilObjFile.php.
References $filetype.
Referenced by createProperties(), doCreateMetaData(), doUpdateMetaData(), and guessFileType().
ilObjFile::getMode | ( | ) |
mode is object or filelist
Definition at line 538 of file class.ilObjFile.php.
References $mode.
Referenced by beforeUpdate(), createPreview(), createProperties(), deletePreview(), doDelete(), and doUpdate().
ilObjFile::getSpecificVersion | ( | $version_id | ) |
Gets a specific file version.
int | $version_id | The version id to get. |
Definition at line 1134 of file class.ilObjFile.php.
References ilHistory\_getEntryByHistoryID(), and parseInfoParams().
Referenced by rollback().
ilObjFile::getUploadFile | ( | $a_upload_file, | |
$a_filename, | |||
$a_prevent_preview = false |
|||
) |
Definition at line 207 of file class.ilObjFile.php.
References $file, createPreview(), getDirectory(), getVersion(), handleQuotaUpdate(), ilUtil\makeDirParents(), ilUtil\moveUploadedFile(), and setVersion().
Referenced by addFileVersion(), and replaceFile().
ilObjFile::getUsages | ( | ) |
get all usages of file object
Definition at line 921 of file class.ilObjFile.php.
References $ret, and ilObject2\getId().
Referenced by beforeDelete(), and handleQuotaUpdate().
ilObjFile::getVersion | ( | ) |
Definition at line 518 of file class.ilObjFile.php.
Referenced by addFileVersion(), deleteVersions(), determineFileSize(), doUpdate(), export(), getFile(), getUploadFile(), rollback(), sendFile(), and storeUnzipedFile().
ilObjFile::getVersions | ( | $version_ids = null | ) |
Gets the file versions for this object.
array | $version_ids | The file versions to get. If not specified all versions are returned. |
Definition at line 1099 of file class.ilObjFile.php.
References ilHistory\_getEntriesForObject(), ilObject2\getId(), ilObject2\getType(), and parseInfoParams().
Referenced by deleteVersions().
ilObjFile::getXMLZip | ( | ) |
Reimplemented from ilObject.
Definition at line 969 of file class.ilObjFile.php.
References ilObject\$ilias, ilUtil\escapeShellArg(), getDirectory(), and getFileName().
ilObjFile::guessFileType | ( | $a_file = "" | ) |
Guesses the file type based on the current values returned by getFileType() and getFileExtension().
If getFileType() returns 'application/octet-stream', the file extension is used to guess a more accurate file type.
Definition at line 697 of file class.ilObjFile.php.
References $filename, $path, getFileType(), and ilMimeTypeUtil\getMimeType().
Referenced by sendFile(), and updateWithVersion().
|
staticprotected |
Definition at line 1274 of file class.ilObjFile.php.
References getDiskUsage(), ilObject2\getId(), ilObject2\getType(), getUsages(), and ilDiskQuotaHandler\handleUpdatedSourceObject().
Referenced by _deleteAllUsages(), _saveUsage(), deleteVersions(), doDelete(), doUpdate(), and getUploadFile().
ilObjFile::hasRating | ( | ) |
Definition at line 1332 of file class.ilObjFile.php.
References $rating.
Referenced by doUpdate().
ilObjFile::initFileStorage | ( | ) |
init file storage object
public
Definition at line 1016 of file class.ilObjFile.php.
References ilObject2\getId().
Referenced by __construct(), createProperties(), doRead(), and getDirectory().
ilObjFile::initType | ( | ) |
Reimplemented from ilObject2.
Definition at line 48 of file class.ilObjFile.php.
ilObjFile::isHidden | ( | ) |
Returns true, if this file should be hidden in the repository view.
Definition at line 685 of file class.ilObjFile.php.
References ilObjFileAccess\_isFileHidden(), and ilObject2\getTitle().
Referenced by addNewsNotification().
ilObjFile::isInline | ( | ) |
Returns true, if this file should be displayed inline in a browser window.
This is especially useful for PDF documents, HTML pages, and for images which are directly supported by the browser.
Definition at line 678 of file class.ilObjFile.php.
References ilObjFileAccess\_isFileInline(), and ilObject2\getTitle().
Referenced by sendFile().
ilObjFile::parseInfoParams | ( | $entry | ) |
Parses the info parameters ("info_params") of the specified history entry.
array | $entry | The history entry. |
Definition at line 1246 of file class.ilObjFile.php.
References $result.
Referenced by determineFileSize(), getFile(), getSpecificVersion(), getVersions(), and sendFile().
ilObjFile::raiseUploadError | ( | $a_raise = true | ) |
Definition at line 202 of file class.ilObjFile.php.
ilObjFile::replaceFile | ( | $a_upload_file, | |
$a_filename | |||
) |
replace file with new file
Definition at line 232 of file class.ilObjFile.php.
References ilHistory\_createEntry(), addNewsNotification(), createPreview(), ilObject2\getId(), and getUploadFile().
ilObjFile::rollback | ( | $version_id | ) |
Makes the specified version the current one and returns theSummary of rollbackVersion.
int | $version_id | The id of the version to make the current one. |
Definition at line 1159 of file class.ilObjFile.php.
References $ilUser, ilHistory\_changeUserId(), ilHistory\_createEntry(), addNewsNotification(), copy(), getDirectory(), ilObject2\getId(), getSpecificVersion(), getVersion(), ilUtil\makeDir(), and updateWithVersion().
ilObjFile::sendFile | ( | $a_hist_entry_id = null | ) |
Definition at line 610 of file class.ilObjFile.php.
References $file, ilHistory\_getEntryByHistoryID(), ilUtil\deliverFile(), getDirectory(), getFileName(), ilObject2\getTitle(), getVersion(), guessFileType(), isInline(), and parseInfoParams().
ilObjFile::setFileName | ( | $a_name | ) |
set filename
Definition at line 444 of file class.ilObjFile.php.
Referenced by doRead(), and updateWithVersion().
ilObjFile::setFileSize | ( | $a_size | ) |
Definition at line 467 of file class.ilObjFile.php.
Referenced by determineFileSize(), and doRead().
ilObjFile::setFileType | ( | $a_type | ) |
Definition at line 454 of file class.ilObjFile.php.
References $ilLog.
Referenced by doMDUpdateListener(), doRead(), and updateWithVersion().
ilObjFile::setMode | ( | $a_mode | ) |
mode is object or filelist
string | $a_mode | mode |
Definition at line 528 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setRating | ( | $a_value | ) |
Definition at line 1327 of file class.ilObjFile.php.
Referenced by doRead().
ilObjFile::setVersion | ( | $a_version | ) |
Definition at line 513 of file class.ilObjFile.php.
Referenced by deleteVersions(), doRead(), getUploadFile(), storeUnzipedFile(), and updateWithVersion().
ilObjFile::storeUnzipedFile | ( | $a_upload_file, | |
$a_filename | |||
) |
storeUnzipedFile
Stores Files unzipped from uploaded archive in filesystem
string | $a_upload_file | |
string | $a_filename |
Definition at line 1030 of file class.ilObjFile.php.
References $file, createPreview(), getDirectory(), getVersion(), ilUtil\makeDir(), and setVersion().
|
protected |
Updates the file object with the specified file version.
array | $version | The version to update the file object with. |
Definition at line 1206 of file class.ilObjFile.php.
References checkFileExtension(), createPreview(), determineFileSize(), ilObject2\getTitle(), guessFileType(), setFileName(), setFileType(), ilObject2\setTitle(), setVersion(), and ilObject2\update().
Referenced by deleteVersions(), and rollback().
|
private |
Definition at line 27 of file class.ilObjFile.php.
Referenced by _lookupAbsolutePath().
ilObjFile::$filemaxsize = "20000000" |
Definition at line 22 of file class.ilObjFile.php.
ilObjFile::$filename |
Definition at line 20 of file class.ilObjFile.php.
Referenced by _lookupAbsolutePath(), getFileName(), and guessFileType().
ilObjFile::$filetype |
Definition at line 21 of file class.ilObjFile.php.
Referenced by getFileType().
ilObjFile::$mode = "object" |
Definition at line 24 of file class.ilObjFile.php.
Referenced by getMode().
ilObjFile::$raise_upload_error |
Definition at line 23 of file class.ilObjFile.php.
|
protected |
Definition at line 25 of file class.ilObjFile.php.
Referenced by hasRating().