ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilChatroomTabFactory Class Reference

Class ilChatroomTabFactory. More...

+ Collaboration diagram for ilChatroomTabFactory:

Static Public Member Functions

static convertLowerCamelCaseToUnderscoreCaseConversion ($value)
 Convert a value given in lower camel case conversion to underscore case conversion (e.g.
static convertUnderscoreCaseToLowerCamelCaseConversion ($value, $upper_case_first=FALSE)
 Convert a value given in underscore case conversion to lower camel case conversion (e.g.

Private Member Functions

 getLabel ($tabDefinition, $id)
 Returns label for tab by $tabDefinition or $id.

Private Attributes

 $gui
 $lng

Detailed Description

Member Function Documentation

static ilChatroomTabFactory::convertLowerCamelCaseToUnderscoreCaseConversion (   $value)
static

Convert a value given in lower camel case conversion to underscore case conversion (e.g.

MyClass to my_class)

Parameters
string$valueValue in lower camel case conversion
Returns
string The value in underscore case conversion

Definition at line 358 of file class.ilChatroomTabFactory.php.

{
return strtolower(preg_replace('/(.*?)-(.*?)/', '$1_$2', $value));
}
static ilChatroomTabFactory::convertUnderscoreCaseToLowerCamelCaseConversion (   $value,
  $upper_case_first = FALSE 
)
static

Convert a value given in underscore case conversion to lower camel case conversion (e.g.

my_class to MyClass)

Parameters
string$valueValue in underscore case conversion
boolean$upper_case_firstIf TRUE first character in upper case, lower case if FALSE
Returns
string The value in lower camel case conversion

Definition at line 369 of file class.ilChatroomTabFactory.php.

{
$tokens = (array)explode('_', $value);
$value = '';
foreach($tokens as $token)
{
$value .= ucfirst($token);
}
if($upper_case_first === FALSE)
{
$value = strtolower($value, 0, 1) . substr($value, 1);
}
return $value;
}
ilChatroomTabFactory::getLabel (   $tabDefinition,
  $id 
)
private

Returns label for tab by $tabDefinition or $id.

Parameters
array$tabDefinition
string$id
Returns
string
Todo:
: $tabDefinition sollte doch stets ein array und $id stets ein string sein, oder? Dann sollte man auch hier typehinten. (array $tabDefinition, string $id)

Definition at line 345 of file class.ilChatroomTabFactory.php.

{
if(isset($tabDefinition['lng']))
return $this->lng->txt($tabDefinition['lng']);
else
return $this->lng->txt($id);
}

Field Documentation

ilChatroomTabFactory::$gui
private

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

ilChatroomTabFactory::$lng
private

Definition at line 21 of file class.ilChatroomTabFactory.php.


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