ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAssQuestionProcessLockFileStorage Class Reference
+ Inheritance diagram for ilAssQuestionProcessLockFileStorage:
+ Collaboration diagram for ilAssQuestionProcessLockFileStorage:

Public Member Functions

 __construct ($questionId, $userId)
 getPath ()
 Get path.
 create ()
 Create directory.
- Public Member Functions inherited from ilFileSystemStorage
 __construct ($a_storage_type, $a_path_conversion, $a_container_id)
 Constructor.
 getContainerId ()
 getAbsolutePath ()
 Get absolute path of storage directory.
 writeToFile ($a_data, $a_absolute_path)
 Write data to file.
 deleteFile ($a_abs_name)
 Delete file.
 deleteDirectory ($a_abs_name)
 Delete directory.
 delete ()
 Delete complete directory.
 copyFile ($a_from, $a_to)
 Copy files.
 appendToPath ($a_appendix)
 getStorageType ()
 __construct ($a_storage_type, $a_path_conversion, $a_container_id)
 Constructor.
 getAbsolutePath ()
 Get absolute path of storage directory.
 getShortPath ()
 rename ($from, $to)

Protected Member Functions

 getPathPrefix ()
 Get path prefix.
 getPathPostfix ()
 Get directory name.
- Protected Member Functions inherited from ilFileSystemStorage
 init ()
 Read path info.

Private Member Functions

 initSubPath ($userId)

Private Attributes

 $subPath

Additional Inherited Members

- Static Public Member Functions inherited from ilFileSystemStorage
static _createPathFromId ($a_container_id, $a_name)
 Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
 _copyDirectory ($a_source, $a_target)
 Copy directory and all contents.
static _createPathFromId ($a_container_id, $a_name)
 Create a path from an id: e.g 12345 will be converted to 12/34/<name>_5.
- Data Fields inherited from ilFileSystemStorage
const STORAGE_WEB = 1
const STORAGE_DATA = 2
const FACTOR = 100
const MAX_EXPONENT = 3
- Protected Attributes inherited from ilFileSystemStorage
 $path

Detailed Description

Constructor & Destructor Documentation

ilAssQuestionProcessLockFileStorage::__construct (   $questionId,
  $userId 
)

Definition at line 16 of file class.ilAssQuestionProcessLockFileStorage.php.

References initSubPath(), and ilFileSystemStorage\STORAGE_DATA.

{
$this->initSubPath($userId);
}

+ Here is the call graph for this function:

Member Function Documentation

ilAssQuestionProcessLockFileStorage::create ( )

Create directory.

public

Reimplemented from ilFileSystemStorage.

Definition at line 55 of file class.ilAssQuestionProcessLockFileStorage.php.

References getPath(), and ilUtil\makeDirParents().

{
if(!file_exists($this->getPath()))
{
}
return true;
}

+ Here is the call graph for this function:

ilAssQuestionProcessLockFileStorage::getPath ( )

Get path.

Reimplemented from ilFileSystemStorage.

Definition at line 50 of file class.ilAssQuestionProcessLockFileStorage.php.

References $subPath.

Referenced by create().

{
return parent::getPath() . '/' . $this->subPath;
}

+ Here is the caller graph for this function:

ilAssQuestionProcessLockFileStorage::getPathPostfix ( )
protected

Get directory name.

E.g for files => file Only relative path, no trailing slash '_<obj_id>' will be appended automatically

protected

Returns
string directory name

Reimplemented from ilFileSystemStorage.

Definition at line 45 of file class.ilAssQuestionProcessLockFileStorage.php.

{
return 'question';
}
ilAssQuestionProcessLockFileStorage::getPathPrefix ( )
protected

Get path prefix.

Prefix that will be prepended to the path No trailing slash. E.g ilFiles for files

protected

Returns
string path prefix e.g files

Reimplemented from ilFileSystemStorage.

Definition at line 31 of file class.ilAssQuestionProcessLockFileStorage.php.

{
return 'ilAssQuestionProcessLocks';
}
ilAssQuestionProcessLockFileStorage::initSubPath (   $userId)
private

Definition at line 64 of file class.ilAssQuestionProcessLockFileStorage.php.

References ilFileSystemStorage\$path.

Referenced by __construct().

{
$userId = (string)$userId;
$path = array();
for($i = 0, $max = strlen($userId); $i < $max; $i++)
{
$path[] = substr($userId, $i, 1);
}
$this->subPath = implode('/', $path);
}

+ Here is the caller graph for this function:

Field Documentation

ilAssQuestionProcessLockFileStorage::$subPath
private

Definition at line 14 of file class.ilAssQuestionProcessLockFileStorage.php.

Referenced by getPath().


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