b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (CVS HEAD) [ class tree: evocore ] [ index: evocore ] [ all elements ]

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]



		
		
		
		

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).
string   get_root_dir()   Get the absolute path (FileRoot::ads_path) to a given root (with ending slash).

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

Internal cache


[ Top ]
Methods
static method get_available_FileRoots  [line 61]

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

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

  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 ]
get_root_dir  [line 159]

  string get_root_dir( boolean $root_type, $root_in_type_ID, [ $create = false]  )

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 ]

Documentation generated on Sat, 06 Mar 2010 04:09:01 +0100 by phpDocumentor 1.4.2. This site is hosted and maintained by Daniel HAHLER (Contact).