|
Stud.IP
jlu_3.3 Revision
|

Public Member Functions | |
| __construct ($studipDocument, $mimeType) | |
| filename () | |
| type () | |
| url () | |
| createFolder ( $name, $description=NULL, $parent_id=NULL, $permission=7) | |
Static Public Member Functions | |
| static | storeUploadedFilesIn ($folder_id) |
| static | getUploadedFiles () |
| static | fromUpload ($file, $folder_id) |
| static | studipData ($file, $folder_id) |
| static | getFolderId ($name, $parent_id=null) |
| static | executeQuery ($query, $parameters, $fetch=true) |
Info about Stud.IP documents uploaded by the WYSIWYG editor and collection of static methods for uploading files.
| __construct | ( | $studipDocument, | |
| $mimeType | |||
| ) |
Construct new WysiwygDocument for an uploaded Stud.IP document.
| createFolder | ( | $name, | |
$description = NULL, |
|||
$parent_id = NULL, |
|||
$permission = 7 |
|||
| ) |
Create a new Stud.IP folder or return an existing one.
| string | $name | Folder name. |
| string | $description | Folder description. Only used if folder doesn't already exist. |
| string | $parent_id | Parent folder's ID, NULL for top-level folders. |
| int | $permission | Folder access permissions. |

|
static |
Execute a database query and return it's results.
Do not use this function to fetch large result sets! Result format is as defined by PDO::ATTR_DEFAULT_FETCH_MODE.
| string | $query | SQL query to execute. |
| array | $parameters | Parameters for the SQL query. |
| boolean | $fetch | If set to FALSE fetchAll() is not executed. |

| filename | ( | ) |
|
static |
Create a new Stud.IP document from an uploaded file.
| array | $file | Metadata of uploaded file. |
| string | $folder_id | ID of Stud.IP folder to which file is stored. |
| AccessDeniedException | if file is forbidden or upload failed. |

|
static |
Return a folder's identifier.
@params string $name Folder name. @params string $parent_id Parent folder's ID, NULL for top-level folders.
|
static |
Normalize $_FILES for HTML array upload of multiple files.
$_FILES must have the following structure (HTML array upload):
['files' => ['name' => [name1, name2, ...], 'tmp_name' => [tmp1, tmp2, ...], 'type' => [type1, type2, ...], 'size' => [size1, size2, ...], 'error' => [error1, error2, ...], ...]
The return value will have the structure:
[['name' => name1, 'tmp_name' => tmp1, 'type' => type1, 'size' => size1, 'error' => error1, ...], ['name' => name2, 'tmp_name' => tmp2, 'type' => type2, 'size' => size2, 'error' => error2, ...], ...]
|
static |
Store uploaded files as StudIP documents.
| string | $folder_id | UID of Stud.IP document folder to which files are stored. |

|
static |
| type | ( | ) |
| url | ( | ) |
Return URL for downloading the file.
| string | $id | File identifier in database table 'dokumente'. |
