Elgg  Version 1.9
Public Member Functions | Public Attributes | List of all members
Elgg_EntityDirLocator Class Reference

Public Member Functions

 __construct ($guid)
 Find an entity's data dir. More...
 
 getPath ()
 Construct a file path matrix for an entity. More...
 
 __toString ()
 String casting magic method. More...
 

Public Attributes

const BUCKET_SIZE = 5000
 Number of entries per matrix dir. More...
 

Detailed Description

Definition at line 15 of file EntityDirLocator.php.

Constructor & Destructor Documentation

Elgg_EntityDirLocator::__construct (   $guid)

Find an entity's data dir.

Parameters
int$guidGUID of the entity.
Exceptions
InvalidArgumentException

Definition at line 29 of file EntityDirLocator.php.

Member Function Documentation

Elgg_EntityDirLocator::__toString ( )

String casting magic method.

Returns
string

Definition at line 57 of file EntityDirLocator.php.

Elgg_EntityDirLocator::getPath ( )

Construct a file path matrix for an entity.

As of 1.9.0 matrixes are based on GUIDs and separated into dirs of 5000 entries with the dir name being the lower bound for the GUID.

Returns
string The path with trailing '/' where the entity's data will be stored relative to the data dir.

Definition at line 47 of file EntityDirLocator.php.

Member Data Documentation

const Elgg_EntityDirLocator::BUCKET_SIZE = 5000

Number of entries per matrix dir.

DO NOT CHANGE!

Definition at line 20 of file EntityDirLocator.php.


The documentation for this class was generated from the following file: