ILIAS
Release_5_0_x_branch Revision 61816
|
Access class for file objects. More...
Public Member Functions | |
_getCommands () | |
get commands | |
_checkGoto ($a_target) | |
check whether goto script will succeed | |
_lookupFileData ($a_id) | |
looks up the file_data for the file object with the specified object id | |
_lookupVersion ($a_id) | |
lookup version | |
_lookupSuffix ($a_id) | |
lookup suffix | |
_lookupDiskUsage ($a_id) | |
Returns the number of bytes used on the harddisk by the file object with the specified object id. | |
_preloadData ($a_obj_ids, $a_ref_ids) | |
Preload data. | |
_lookupVersion ($a_id) | |
lookup version | |
_lookupFileSize ($a_id) | |
lookup size | |
Public Member Functions inherited from ilObjectAccess | |
_checkAccess ($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="") | |
Checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) | |
_checkCondition ($a_obj_id, $a_operator, $a_value, $a_usr_id) | |
check condition |
Static Public Member Functions | |
static | _lookupFileSize ($a_id) |
Quickly looks up the file size from the database and returns the number of bytes. | |
static | _lookupFileSizeFromFilesystem ($a_id) |
Looks up the file size by retrieving it from the filesystem. | |
static | _isFileInline ($a_file_name) |
Returns true, if the specified file shall be displayed inline in the browser. | |
static | _getFileExtension ($a_file_name) |
Gets the file extension of the specified file name. | |
static | _isFileHidden ($a_file_name) |
Returns true, if a file with the specified name, is usually hidden from the user. | |
static | _appendNumberOfCopyToFilename ($a_file_name, $nth_copy=null, $a_handle_extension=false) |
Appends the text " - Copy" to a filename in the language of the current user. | |
static | _getPermanentDownloadLink ($ref_id) |
Gets the permanent download link for the file. | |
static | getListGUIData ($a_obj_id) |
Static Public Member Functions inherited from ilObjectAccess | |
static | _isOffline ($a_obj_id) |
Type-specific implementation of general status, has to be overwritten. |
Static Protected Attributes | |
static | $_inlineFileExtensionsArray |
Contains an array of extensions separated by space. | |
static | $preload_list_gui_data |
Access class for file objects.
Definition at line 16 of file class.ilObjFileAccess.php.
|
static |
Appends the text " - Copy" to a filename in the language of the current user.
If the provided $nth_copy parameter is greater than 1, then is appended in round brackets. If $nth_copy parameter is null, then the function determines the copy number on its own.
If this function detects, that the filename already ends with " - Copy", or with "- Copy ($nth_copy), it only appends the number of the copy to the filename.
This function retains the extension of the filename.
Examples:
Definition at line 279 of file class.ilObjFileAccess.php.
References $lng, and _getFileExtension().
Referenced by ilObject\appendCopyInfo(), and ilContainerGUI\performPasteIntoMultipleObjectsObject().
ilObjFileAccess::_checkGoto | ( | $a_target | ) |
check whether goto script will succeed
Reimplemented from ilObjectAccess.
Definition at line 56 of file class.ilObjFileAccess.php.
References ilSharedResourceGUI\hasAccess().
ilObjFileAccess::_getCommands | ( | ) |
get commands
this method returns an array of all possible commands/permission combinations
example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );
Reimplemented from ilObjectAccess.
Definition at line 43 of file class.ilObjFileAccess.php.
Referenced by ilObjFileListGUI\init().
|
static |
Gets the file extension of the specified file name.
The file name extension is converted to lower case before it is returned.
For example, for the file name "HELLO.MP3", this function returns "mp3".
A file name extension can have multiple parts. For the file name "hello.tar.gz", this function returns "gz".
string | $a_file_name | The file name |
Definition at line 222 of file class.ilObjFileAccess.php.
Referenced by _appendNumberOfCopyToFilename(), _isFileInline(), _lookupSuffix(), ilObjFile\checkFileExtension(), ilObjFile\getFileExtension(), ilObjFileListGUI\getProperties(), ilObjFileGUI\handleFileUpload(), ilObjFileGUI\save(), and ilFilePreviewRenderer\supports().
|
static |
Gets the permanent download link for the file.
Definition at line 353 of file class.ilObjFileAccess.php.
References $ref_id, and ilLink\_getStaticLink().
Referenced by ilObjFileListGUI\getCommandLink(), and ilObjFileGUI\infoScreenForward().
|
static |
Returns true, if a file with the specified name, is usually hidden from the user.
Definition at line 243 of file class.ilObjFileAccess.php.
Referenced by ilItemGroupItems\getAssignableItems(), ilObjectListGUI\getListItemHTML(), ilContainer\getSubItems(), ilObjFile\isHidden(), and ilExportSelectionTableGUI\parseContainer().
|
static |
Returns true, if the specified file shall be displayed inline in the browser.
Definition at line 199 of file class.ilObjFileAccess.php.
References _getFileExtension().
Referenced by ilObjFileListGUI\getCommandFrame(), ilObjFileListGUI\getIconImageType(), and ilObjFile\isInline().
ilObjFileAccess::_lookupDiskUsage | ( | $a_id | ) |
Returns the number of bytes used on the harddisk by the file object with the specified object id.
int | object id of a file object. |
Definition at line 187 of file class.ilObjFileAccess.php.
References ilUtil\dirsize().
Referenced by ilObjFile\getDiskUsage().
ilObjFileAccess::_lookupFileData | ( | $a_id | ) |
looks up the file_data for the file object with the specified object id
as an associative array.
Definition at line 85 of file class.ilObjFileAccess.php.
References $ilDB, $row, and DB_FETCHMODE_ASSOC.
ilObjFileAccess::_lookupFileSize | ( | $a_id | ) |
lookup size
Definition at line 44 of file class.ilObjFileAccess.php.
References $file, $ilDB, $row, $size, _lookupVersion(), and DB_FETCHMODE_OBJECT.
|
static |
Quickly looks up the file size from the database and returns the number of bytes.
Definition at line 114 of file class.ilObjFileAccess.php.
References $ilDB, $row, $size, and DB_FETCHMODE_OBJECT.
Referenced by ilObjectXMLWriter\__appendObjectProperties().
|
static |
Looks up the file size by retrieving it from the filesystem.
This function runs much slower than _lookupFileSize()! Use this function only, to update the data in the database. For example, if the file size in the database has become inconsistent for some reason.
Definition at line 133 of file class.ilObjFileAccess.php.
References $file, $ilDB, $row, $size, _lookupVersion(), and DB_FETCHMODE_OBJECT.
ilObjFileAccess::_lookupSuffix | ( | $a_id | ) |
lookup suffix
Definition at line 167 of file class.ilObjFileAccess.php.
References $ilDB, $row, _getFileExtension(), and DB_FETCHMODE_OBJECT.
Referenced by ilObjectXMLWriter\__appendObjectProperties().
ilObjFileAccess::_lookupVersion | ( | $a_id | ) |
lookup version
Definition at line 30 of file class.ilObjFileAccess.php.
References $ilDB, $row, and DB_FETCHMODE_OBJECT.
ilObjFileAccess::_lookupVersion | ( | $a_id | ) |
lookup version
Definition at line 99 of file class.ilObjFileAccess.php.
References $ilDB, $row, DB_FETCHMODE_OBJECT, and ilUtil\stripSlashes().
Referenced by ilObjectXMLWriter\__appendObjectProperties(), _lookupFileSize(), and _lookupFileSizeFromFilesystem().
ilObjFileAccess::_preloadData | ( | $a_obj_ids, | |
$a_ref_ids | |||
) |
Preload data.
array | $a_obj_ids | array of object ids |
Reimplemented from ilObjectAccess.
Definition at line 359 of file class.ilObjFileAccess.php.
|
static |
Definition at line 385 of file class.ilObjFileAccess.php.
Referenced by ilObjFileListGUI\getProperties().
|
staticprotected |
Contains an array of extensions separated by space.
Since this array is needed for every file object displayed on a repository page, we only create it once, and cache it here.
Definition at line 25 of file class.ilObjFileAccess.php.
|
staticprotected |
Definition at line 28 of file class.ilObjFileAccess.php.