Class: FileRootCache
Source Location: /blogs/inc/files/model/_filerootcache.class.php
Class FileRootCache
Class Overview
|
This class provides info about File Roots. These are root directories available for media file storage, under access permission. Located in /blogs/inc/files/model/_filerootcache.class.php [line 42] |
[ Top ]
Method Summary
| static array | get_available_FileRoots() | Get an array of ALL available Fileroots (not just the cached ones). |
| FileRoot|false | &get_by_ID() | Get a FileRoot (cached) by ID. |
| FileRoot|false | &get_by_type_and_ID() | Get a FileRoot (cached). |
| string | get_root_dir() | Get the absolute path (FileRoot::ads_path) to a given root (with ending slash). |
[ Top ]
Methods
static method get_available_FileRoots [line 61]
|
Get an array of ALL available Fileroots (not just the cached ones).
API Tags:
| Return: | of FileRoots (key being the FileRoot's ID) |
Information Tags:
| Todo: | fp> it would probably make sense to refactor this as the constructor for the file roots and initialize the whole cache at construction time |
[ Top ]
get_by_ID [line 116]
|
Get a FileRoot (cached) by ID.
Parameters:| string | $id: | ID of the FileRoot (e.g. 'user_X' or 'collection_X') |
| boolean | $create: | Create the directory, if it does not exist yet? |
API Tags:
| Return: | FileRoot on success, false on failure (ads_path is false). |
| Uses: | FileRootCache::get_by_type_and_ID() |
[ Top ]
get_by_type_and_ID [line 134]
|
Get a FileRoot (cached).
Parameters:| string | $root_type: | Root type: 'user', 'group', 'collection' or 'absolute' |
| integer | $root_in_type_ID: | ID of the user, the group or the collection the file belongs to... |
| boolean | $create: | Create the directory, if it does not exist yet? |
API Tags:
| Return: | FileRoot on success, false on failure (ads_path is false). |
| Usedby: | FileRootCache::get_by_ID() |
[ Top ]
get_root_dir [line 159]
|
Get the absolute path (FileRoot::ads_path) to a given root (with ending slash).
Parameters:| boolean | $root_type: | Create the directory, if it does not exist yet? |
| $root_in_type_ID: | ||
| $create: |
API Tags:
| Deprecated: | since 1.9 |
[ Top ]
