Detailed Description
Definition at line 9 of file Util.php.
Member Function Documentation
static generateInStatement |
( |
|
$options | ) |
|
|
static |
Generates a database-IN-statement out of the given options
- Parameters:
-
- Returns:
- string the in-statement
Definition at line 60 of file Util.php.
{
$ret = ' IN ( ';
foreach($options as $key =>$option){
if($key > 0)
$ret.= ' , ';
$ret.= ctype_digit($option) ? $option : ' "'.$option.'" ';
}
$ret.= ' ) ';
return $ret;
}
static getDataBaseType |
( |
|
$obj | ) |
|
|
static |
Returns the database-type of the given object
- Parameters:
-
- Returns:
- string
- Exceptions:
-
Definition at line 17 of file Util.php.
{
$class = get_class($obj);
switch($class){
case 'RGroup':
return 'aro';
case 'AGroup':
return 'aco';
default:
throw new InvalidArgumentException('Unexpected Object');
}
}
static getIdsOfObjects |
( |
|
$objects | ) |
|
|
static |
Extracts the IDs of the given bunch of objects and returns them in an indexed arry
- Parameters:
-
- Returns:
- array[int]
Definition at line 80 of file Util.php.
{
$ret = array();
foreach($objects as $obj){
$ret[] = $obj->id;
}
return $ret;
}
Returns the class-name of the node belonging to the given Object
- Parameters:
-
- Returns:
- string
- Exceptions:
-
Definition at line 40 of file Util.php.
{
$class = get_class($obj);
switch($class){
case 'RGroup':
case 'CGroup':
default:
throw new InvalidArgumentException('Unexpected Object');
}
}
The documentation for this class was generated from the following file:
- D:/Projekte/Web/exportAcl/acl/models/Util.php