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

Public Member Functions

 ilMDOrComposite ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setOrCompositeId ($a_or_composite_id)
 getOrCompositeId ()
getRequirementIds ()
getRequirement ($a_requirement_id)
addRequirement ()
 save ()
 delete ()
 toXML (&$writer)
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
 ilMDOrComposite ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setOrCompositeId ($a_or_composite_id)
 getOrCompositeId ()
getRequirementIds ()
getRequirement ($a_requirement_id)
addRequirement ()
 save ()
 delete ()
 toXML (&$writer)
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type)
- Public Member Functions inherited from ilMDRequirement
 ilMDRequirement ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setOperatingSystemName ($a_val)
 getOperatingSystemName ()
 setOperatingSystemMinimumVersion ($a_val)
 getOperatingSystemMinimumVersion ()
 setOperatingSystemMaximumVersion ($a_val)
 getOperatingSystemMaximumVersion ()
 setBrowserName ($a_val)
 getBrowserName ()
 setBrowserMinimumVersion ($a_val)
 getBrowserMinimumVersion ()
 setBrowserMaximumVersion ($a_val)
 getBrowserMaximumVersion ()
 update ()
 __getFields ()
 read ()
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)
 ilMDRequirement ($a_rbac_id=0, $a_obj_id=0, $a_obj_type= '')
 setOperatingSystemName ($a_val)
 getOperatingSystemName ()
 setOperatingSystemMinimumVersion ($a_val)
 getOperatingSystemMinimumVersion ()
 setOperatingSystemMaximumVersion ($a_val)
 getOperatingSystemMaximumVersion ()
 setBrowserName ($a_val)
 getBrowserName ()
 setBrowserMinimumVersion ($a_val)
 getBrowserMinimumVersion ()
 setBrowserMaximumVersion ($a_val)
 getBrowserMaximumVersion ()
 update ()
 __getFields ()
 read ()
 _getIds ($a_rbac_id, $a_obj_id, $a_parent_id, $a_parent_type, $a_or_composite_id=0)
- Public Member Functions inherited from ilMDBase
 ilMDBase ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 setRBACId ($a_id)
 getRBACId ()
 setObjId ($a_id)
 getObjId ()
 setObjType ($a_type)
 getObjType ()
 setMetaId ($a_meta_id, $a_read_data=true)
 getMetaId ()
 setParentType ($a_parent_type)
 getParentType ()
 setParentId ($a_id)
 getParentId ()
 setExportMode ($a_export_mode=true)
 getExportMode ()
 validate ()
 ilMDBase ($a_rbac_id=0, $a_obj_id=0, $a_type=0)
 setRBACId ($a_id)
 getRBACId ()
 setObjId ($a_id)
 getObjId ()
 setObjType ($a_type)
 getObjType ()
 setMetaId ($a_meta_id, $a_read_data=true)
 getMetaId ()
 setParentType ($a_parent_type)
 getParentType ()
 setParentId ($a_id)
 getParentId ()
 validate ()

Additional Inherited Members

- Data Fields inherited from ilMDBase
 $rbac_id
 $obj_id
 $obj_type
 $export_mode = false

Detailed Description

Definition at line 35 of file class.ilMDOrComposite.php.

Member Function Documentation

ilMDOrComposite::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)

Definition at line 147 of file class.ilMDOrComposite.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

{
global $ilDB;
$query = "SELECT DISTINCT(or_composite_id) AS or_composite_id FROM il_meta_requirement ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id)." ".
"AND obj_id = ".$ilDB->quote($a_obj_id)." ".
"AND parent_id = ".$ilDB->quote($a_parent_id)." ".
"AND parent_type = ".$ilDB->quote($a_parent_type)." ".
"AND or_composite_id > 0 ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->or_composite_id;
}
return $ids ? $ids : array();
}
ilMDOrComposite::_getIds (   $a_rbac_id,
  $a_obj_id,
  $a_parent_id,
  $a_parent_type 
)

Definition at line 153 of file class.ilMDOrComposite.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilMDTechnical\getOrCompositeIds(), and getRequirementIds().

{
global $ilDB;
$query = "SELECT DISTINCT(or_composite_id) or_composite_id FROM il_meta_requirement ".
"WHERE rbac_id = ".$ilDB->quote($a_rbac_id ,'integer')." ".
"AND obj_id = ".$ilDB->quote($a_obj_id ,'integer')." ".
"AND parent_id = ".$ilDB->quote($a_parent_id ,'integer')." ".
"AND parent_type = ".$ilDB->quote($a_parent_type ,'text')." ".
"AND or_composite_id > 0 ";
$res = $ilDB->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$ids[] = $row->or_composite_id;
}
return $ids ? $ids : array();
}

+ Here is the caller graph for this function:

& ilMDOrComposite::addRequirement ( )

Definition at line 94 of file class.ilMDOrComposite.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getRBACId(), and ilMDRequirement\ilMDRequirement().

{
include_once 'Services/MetaData/classes/class.ilMDRequirement.php';
$req =& new ilMDRequirement($this->getRBACId(),$this->getObjId(),$this->getObjType());
$req->setParentId($this->getParentId());
$req->setParentType('meta_technical');
$req->setOrCompositeId($this->getOrCompositeId());
return $req;
}

+ Here is the call graph for this function:

& ilMDOrComposite::addRequirement ( )

Definition at line 95 of file class.ilMDOrComposite.php.

References ilMDBase\getObjId(), ilMDBase\getObjType(), getOrCompositeId(), ilMDBase\getParentId(), ilMDBase\getRBACId(), and ilMDRequirement\ilMDRequirement().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
$req =& new ilMDRequirement($this->getRBACId(),$this->getObjId(),$this->getObjType());
$req->setParentId($this->getParentId());
$req->setParentType('meta_technical');
$req->setOrCompositeId($this->getOrCompositeId());
return $req;
}

+ Here is the call graph for this function:

ilMDOrComposite::delete ( )

Reimplemented from ilMDRequirement.

Definition at line 115 of file class.ilMDOrComposite.php.

References getRequirement(), and getRequirementIds().

{
foreach($this->getRequirementIds() as $id)
{
$req = $this->getRequirement($id);
$req->delete();
}
return true;
}

+ Here is the call graph for this function:

ilMDOrComposite::delete ( )

Reimplemented from ilMDRequirement.

Definition at line 116 of file class.ilMDOrComposite.php.

References getRequirement(), and getRequirementIds().

{
foreach($this->getRequirementIds() as $id)
{
$req = $this->getRequirement($id);
$req->delete();
}
return true;
}

+ Here is the call graph for this function:

ilMDOrComposite::getOrCompositeId ( )

Reimplemented from ilMDRequirement.

Definition at line 49 of file class.ilMDOrComposite.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getObjId(), and ilMDBase\getRBACId().

Referenced by addRequirement(), and getRequirementIds().

{
global $ilDB;
if(!$this->or_composite_id)
{
$query = "SELECT MAX(or_composite_id) orc FROM il_meta_requirement ".
"WHERE rbac_id = ".$ilDB->quote($this->getRBACId() ,'integer')." ".
"AND obj_id = ".$ilDB->quote($this->getObjId() ,'integer')." ";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->or_composite_id = $row->orc;
}
++$this->or_composite_id;
}
return $this->or_composite_id;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilMDOrComposite::getOrCompositeId ( )

Reimplemented from ilMDRequirement.

Definition at line 49 of file class.ilMDOrComposite.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, ilMDBase\getObjId(), and ilMDBase\getRBACId().

{
global $ilDB;
if(!$this->or_composite_id)
{
$query = "SELECT MAX(or_composite_id) AS orc FROM il_meta_requirement ".
"WHERE rbac_id = ".$ilDB->quote($this->getRBACId())." ".
"AND obj_id = ".$ilDB->quote($this->getObjId())." ".
"GROUP BY or_composite_id";
$res = $this->db->query($query);
while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
{
$this->or_composite_id = $row->orc;
}
++$this->or_composite_id;
}
return $this->or_composite_id;
}

+ Here is the call graph for this function:

& ilMDOrComposite::getRequirement (   $a_requirement_id)

Definition at line 80 of file class.ilMDOrComposite.php.

References ilMDRequirement\ilMDRequirement().

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDRequirement.php';
if(!$a_requirement_id)
{
return false;
}
$req =& new ilMDRequirement();
$req->setMetaId($a_requirement_id);
return $req;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDOrComposite::getRequirement (   $a_requirement_id)

Definition at line 81 of file class.ilMDOrComposite.php.

References ilMDRequirement\ilMDRequirement().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
if(!$a_requirement_id)
{
return false;
}
$req =& new ilMDRequirement();
$req->setMetaId($a_requirement_id);
return $req;
}

+ Here is the call graph for this function:

& ilMDOrComposite::getRequirementIds ( )

Definition at line 69 of file class.ilMDOrComposite.php.

References _getIds(), ilMDBase\getObjId(), getOrCompositeId(), ilMDBase\getParentId(), and ilMDBase\getRBACId().

Referenced by delete(), and toXML().

{
include_once 'Services/MetaData/classes/class.ilMDRequirement.php';
$this->getObjId(),
$this->getParentId(),
'meta_technical',
$this->getOrCompositeId());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilMDOrComposite::getRequirementIds ( )

Definition at line 70 of file class.ilMDOrComposite.php.

References _getIds(), ilMDBase\getObjId(), getOrCompositeId(), ilMDBase\getParentId(), and ilMDBase\getRBACId().

{
include_once 'Services/Migration/DBUpdate_426/classes/class.ilMDRequirement.php';
$this->getObjId(),
$this->getParentId(),
'meta_technical',
$this->getOrCompositeId());
}

+ Here is the call graph for this function:

ilMDOrComposite::ilMDOrComposite (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 37 of file class.ilMDOrComposite.php.

References ilMDRequirement\ilMDRequirement().

{
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

ilMDOrComposite::ilMDOrComposite (   $a_rbac_id = 0,
  $a_obj_id = 0,
  $a_obj_type = '' 
)

Definition at line 37 of file class.ilMDOrComposite.php.

References ilMDRequirement\ilMDRequirement().

{
$a_obj_id,
$a_obj_type);
}

+ Here is the call graph for this function:

ilMDOrComposite::save ( )

Reimplemented from ilMDRequirement.

Definition at line 110 of file class.ilMDOrComposite.php.

{
echo 'Use ilMDOrcomposite::addRequirement()';
}
ilMDOrComposite::save ( )

Reimplemented from ilMDRequirement.

Definition at line 111 of file class.ilMDOrComposite.php.

{
echo 'Use ilMDOrcomposite::addRequirement()';
}
ilMDOrComposite::setOrCompositeId (   $a_or_composite_id)

Reimplemented from ilMDRequirement.

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

{
$this->or_composite_id = (int) $a_or_composite_id;
}
ilMDOrComposite::setOrCompositeId (   $a_or_composite_id)

Reimplemented from ilMDRequirement.

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

{
$this->or_composite_id = (int) $a_or_composite_id;
}
ilMDOrComposite::toXML ( $writer)

Reimplemented from ilMDRequirement.

Definition at line 130 of file class.ilMDOrComposite.php.

References ilMDBase\getObjId(), ilMDBase\getRBACId(), getRequirement(), getRequirementIds(), and ilMDRequirement\ilMDRequirement().

{
// For all requirements
$writer->xmlStartTag('OrComposite');
$reqs = $this->getRequirementIds();
foreach($reqs as $id)
{
$req = $this->getRequirement($id);
$req->toXML($writer);
}
if(!count($reqs))
{
include_once 'Services/MetaData/classes/class.ilMDRequirement.php';
$req = new ilMDRequirement($this->getRBACId(),$this->getObjId());
$req->toXML($writer);
}
$writer->xmlEndTag('OrComposite');
}

+ Here is the call graph for this function:

ilMDOrComposite::toXML ( $writer)

Reimplemented from ilMDRequirement.

Definition at line 131 of file class.ilMDOrComposite.php.

References getRequirement(), and getRequirementIds().

{
// For all requirements
$writer->xmlStartTag('OrComposite');
foreach($this->getRequirementIds() as $id)
{
$req = $this->getRequirement($id);
$req->toXML($writer);
}
$writer->xmlEndTag('OrComposite');
}

+ Here is the call graph for this function:


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