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

Public Member Functions

 __construct ($moduleName, $moduleBasePath, $relativeClassPath= 'classes', $relativeTaskPath= 'tasks')
 Sets class parameters using given parameters.
 hasTask ($task)
 Returns true if file exists.
 loadTask ($task)
 Requires file, whereby given $task is used as parameter in getTaskPath method to build the filename of the file to required.
 buildTask ($task, ilChatroomObjectGUI $gui)
 Builds and returns new task using given $task and $gui.
 getTaskClassName ($task)
 Builds task classname using given $task and returns it.
 getTaskPath ($task)
 Builds task path using given $task and returns it.

Static Public Member Functions

static getDefaultDefinition ($moduleName)
 Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.
static getDefaultDefinitionWithCustomTaskPath ($moduleName, $relativeTaskFolder)
 Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $relativeTaskFolder as parameters.

Private Attributes

 $moduleName
 $moduleBasePath
 $relativeClassPath
 $relativeTaskPath

Detailed Description

Constructor & Destructor Documentation

ilChatroomObjectDefinition::__construct (   $moduleName,
  $moduleBasePath,
  $relativeClassPath = 'classes',
  $relativeTaskPath = 'tasks' 
)

Sets class parameters using given parameters.

Parameters
string$moduleName
string$moduleBasePath
string$relativeClassPath
string$relativeTaskPath

Definition at line 36 of file class.ilChatroomObjectDefinition.php.

References $moduleBasePath, $moduleName, $relativeClassPath, and $relativeTaskPath.

{
$this->moduleName = $moduleName;
$this->moduleBasePath = rtrim($moduleBasePath, '/\\');
$this->relativeClassPath = rtrim($relativeClassPath);
$this->relativeTaskPath = rtrim($relativeTaskPath);
}

Member Function Documentation

ilChatroomObjectDefinition::buildTask (   $task,
ilChatroomObjectGUI  $gui 
)

Builds and returns new task using given $task and $gui.

Parameters
string$task
ilChatroomObjectGUI$gui
Returns
ilChatroomTaskHandler

Definition at line 100 of file class.ilChatroomObjectDefinition.php.

References getTaskClassName().

{
$className = $this->getTaskClassName($task);
$task = new $className($gui);
return $task;
}

+ Here is the call graph for this function:

static ilChatroomObjectDefinition::getDefaultDefinition (   $moduleName)
static

Returns an Instance of ilChatroomObjectDefinition, using given $moduleName as parameter.

Parameters
string$moduleName
Returns
ilChatroomObjectDefinition

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

References $moduleName.

Referenced by ilObjChatroomGUI\getObjectDefinition().

{
$object = new self($moduleName, 'Modules/' . $moduleName . '/');
return $object;
}

+ Here is the caller graph for this function:

static ilChatroomObjectDefinition::getDefaultDefinitionWithCustomTaskPath (   $moduleName,
  $relativeTaskFolder 
)
static

Returns an Instance of ilChatroomObjectDefinition, using given $moduleName and $relativeTaskFolder as parameters.

Parameters
string$moduleName
string$relativeTaskFolder
Returns
ilChatroomObjectDefinition

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

References $moduleName.

Referenced by ilObjChatroomAdminGUI\getObjectDefinition().

{
$object = new self(
$moduleName, 'Modules/' . $moduleName . '/', 'classes', $relativeTaskFolder
);
return $object;
}

+ Here is the caller graph for this function:

ilChatroomObjectDefinition::getTaskClassName (   $task)

Builds task classname using given $task and returns it.

Parameters
string$task
Returns
string

Definition at line 113 of file class.ilChatroomObjectDefinition.php.

Referenced by buildTask(), and getTaskPath().

{
return 'il' . $this->moduleName . ucfirst($task) . 'Task';
}

+ Here is the caller graph for this function:

ilChatroomObjectDefinition::getTaskPath (   $task)

Builds task path using given $task and returns it.

Parameters
string$task
Returns
string

Definition at line 123 of file class.ilChatroomObjectDefinition.php.

References getTaskClassName().

Referenced by hasTask(), and loadTask().

{
return $this->moduleBasePath . '/' . $this->relativeClassPath . '/' .
$this->relativeTaskPath . '/class.' . $this->getTaskClassName($task) . '.php';
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilChatroomObjectDefinition::hasTask (   $task)

Returns true if file exists.

Parameters
string$task
Returns
boolean

Definition at line 78 of file class.ilChatroomObjectDefinition.php.

References getTaskPath().

{
return file_exists($this->getTaskPath($task));
}

+ Here is the call graph for this function:

ilChatroomObjectDefinition::loadTask (   $task)

Requires file, whereby given $task is used as parameter in getTaskPath method to build the filename of the file to required.

Parameters
string$task

Definition at line 88 of file class.ilChatroomObjectDefinition.php.

References getTaskPath().

{
require_once $this->getTaskPath($task);
}

+ Here is the call graph for this function:

Field Documentation

ilChatroomObjectDefinition::$moduleBasePath
private

Definition at line 17 of file class.ilChatroomObjectDefinition.php.

Referenced by __construct().

ilChatroomObjectDefinition::$moduleName
private
ilChatroomObjectDefinition::$relativeClassPath
private

Definition at line 22 of file class.ilChatroomObjectDefinition.php.

Referenced by __construct().

ilChatroomObjectDefinition::$relativeTaskPath
private

Definition at line 27 of file class.ilChatroomObjectDefinition.php.

Referenced by __construct().


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