|
Stud.IP
jlu_3.3 Revision
|


Static Public Member Functions | |
| static | get ($id) |
Static Public Member Functions inherited from SimpleORMap | |
| static | expireTableScheme () |
| static | find ($id) |
| static | exists ($id) |
| static | countBySql ($sql=1, $params=array()) |
| static | create ($data) |
| static | build ($data, $is_new=true) |
| static | buildExisting ($data) |
| static | import ($data) |
| static | findBySQL ($sql, $params=array()) |
| static | findByObject (SimpleORMap $object) |
| static | findOneBySQL ($where, $params=array()) |
| static | findThru ($foreign_key_value, $options) |
| static | findEachBySQL ($callable, $sql, $params=array()) |
| static | findMany ($pks=array(), $order='', $order_params=array()) |
| static | findEachMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | findAndMapBySQL ($callable, $where, $params=array()) |
| static | findAndMapMany ($callable, $pks=array(), $order='', $order_params=array()) |
| static | deleteBySQL ($where, $params=array()) |
| static | toObject ($id_or_object) |
| static | __callStatic ($name, $arguments) |
Static Protected Member Functions | |
| static | configure ($config=array()) |
Static Protected Member Functions inherited from SimpleORMap | |
| static | configure ($config=array()) |
| static | tableScheme ($db_table) |
Protected Attributes | |
| $storage_object | |
Protected Attributes inherited from SimpleORMap | |
| $content = array() | |
| $content_db = array() | |
| $is_new = true | |
| $is_deleted = false | |
| $db_table = '' | |
| $db_fields = null | |
| $pk = null | |
| $default_values = array() | |
| $serialized_fields = array() | |
| $alias_fields = array() | |
| $additional_fields = array() | |
| $relations = array() | |
| $has_many = array() | |
| $has_one = array() | |
| $belongs_to = array() | |
| $has_and_belongs_to_many = array() | |
| $registered_callbacks | |
| $known_slots = array() | |
| $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id') | |
| $notification_map = array() | |
| $additional_data = array() | |
Static Protected Attributes | |
| static | $object_cache = array() |
Static Protected Attributes inherited from SimpleORMap | |
| static | $schemes = null |
| static | $config = array() |
Additional Inherited Members | |
Protected Member Functions inherited from SimpleORMap | |
| _getId ($field) | |
| _setId ($field, $value) | |
| _getAdditionalValueFromRelation ($field) | |
| _setAdditionalValueFromRelation ($field, $value) | |
| _getAdditionalValue ($field) | |
| _setAdditionalValue ($field, $value) | |
| parseRelationOptions ($type, $name, $options) | |
| getTableScheme () | |
| storeRelations ($only_these=null) | |
| deleteRelations () | |
| initializeContent () | |
| applyCallbacks ($type) | |
| registerCallback ($types, $cb) | |
| unregisterCallback ($types, $cb) | |
| cbAutoIncrementColumn ($type) | |
| cbAutoKeyCreation () | |
| cbNotificationMapper ($cb_type) | |
| setSerializedValue ($field, $value) | |
Class to represent files and directories in the database. Should probably use SimpleORMap. Does this work for factory classes like this?.
Copyright (c) 2013 Elmar Ludwig
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Checks whether a user has access to the current file.
| mixed | $user_id | Id of the user or null for current user (default) |
| bool | $throw_exception | Throw an AccessDeniedException instead of returning false |
| AccessDeniedException | if $throw_exception is true and the user may not access this file |
Reimplemented in RootDirectory.
|
staticprotected |
| delete | ( | ) |
Delete all the links to this file and the file itself.
Reimplemented from SimpleORMap.
Reimplemented in RootDirectory, and StudipDirectory.

|
static |
Get a file object for the given id. May be file or directory. If the file does not exist, a new (virtual) RootDirectory is created for this id. TODO Is this a good idea?
| string | $id | file id |


| getLinks | ( | ) |
Return the links to this file (directory entries). Each file can be linked into mutiple directories, like on a POSIX file system. The file is deleted when the link count drops to zero.

| getStorageObject | ( | ) |
Return the Storage Opject from File.
| getStoragePath | ( | ) |
Return the file's storage path.

| isReadable | ( | ) |
Check if the file's backend allows reading of files.
Reimplemented in StudipDirectory.
| isWritable | ( | ) |
Check if the file's backend allows writing of files.
Reimplemented in StudipDirectory.
| open | ( | $mode | ) |
Open a PHP stream resource for this file. Access mode parameter works just like fopen.
| string | $mode | access mode (see fopen) |
Reimplemented in StudipDirectory.

| setContentFromFile | ( | $file | ) |
Sets the contents of the file from another file.

| update | ( | ) |
Update this file's metadata if the content has changed. Note: This needs to be called after each update of the file.
Reimplemented in StudipDirectory.


|
staticprotected |
|
protected |