phpDocumentor files
[ class tree: files ] [ index: files ] [ all elements ]

Class: FileRootCache

Source Location: /qp_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 /qp_inc/files/model/_filerootcache.class.php [line 41]



		
		
		
		

Properties

Methods

[ Top ]
Property Summary
array   $cache   Internal cache

[ 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).

[ Top ]
Properties
array   $cache = array() [line 47]

Internal cache


[ Top ]
Methods
static method get_available_FileRoots  [line 60]

  static array get_available_FileRoots( )

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 110]

  FileRoot|false &get_by_ID( string $id, [boolean $create = false]  )

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 128]

  FileRoot|false &get_by_type_and_ID( string $root_type, integer $root_in_type_ID, [boolean $create = false]  )

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 ]