ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjStudyProgrammeCollection Class Reference

Handles collections of ilObjStudyProgramme-Objects The class extends the ArrayObject class. More...

+ Inheritance diagram for ilObjStudyProgrammeCollection:
+ Collaboration diagram for ilObjStudyProgrammeCollection:

Public Member Functions

 __construct (array $data=array())
 Initialize the ProgrammeCollection. More...
 
 offsetSet ($index, $newval)
 Sets the value at the specified index to newval. More...
 
 append ($value)
 Append ilObjStudyProgramme to the collection. More...
 

Protected Member Functions

 typeCheck ($value)
 Check the type of the given value against ilObjStudyProgramme. More...
 

Detailed Description

Handles collections of ilObjStudyProgramme-Objects The class extends the ArrayObject class.

This allows the class to work as arrays.

See also
http://php.net/manual/de/class.arrayobject.php
Author
Michael Herren mh@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
1.0.0

Definition at line 33 of file class.ilObjStudyProgrammeCollection.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjStudyProgrammeCollection::__construct ( array  $data = array())

Initialize the ProgrammeCollection.

Parameters
array$data

Definition at line 39 of file class.ilObjStudyProgrammeCollection.php.

39 {
40 parent::__construct($data);
41 }
$data

References $data.

Member Function Documentation

◆ append()

ilObjStudyProgrammeCollection::append (   $value)

Append ilObjStudyProgramme to the collection.

Parameters
ilObjStudyProgramme$value
Exceptions
ilException

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

64 {
65 if(!$this->typeCheck($value)) {
66 throw new ilException("You cannot add other types than ilObjStudyProgramme-Objects to ilObjStudyProgrammeCollections.");
67 }
68
69 parent::append($value);
70 }
Base class for ILIAS Exception handling.
typeCheck($value)
Check the type of the given value against ilObjStudyProgramme.

References typeCheck().

+ Here is the call graph for this function:

◆ offsetSet()

ilObjStudyProgrammeCollection::offsetSet (   $index,
  $newval 
)

Sets the value at the specified index to newval.

Parameters
mixed$index
ilObjStudyProgramme$newval
Exceptions
ilException

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

50 {
51 if(!$this->typeCheck($newval)) {
52 throw new ilException("You cannot add other types than ilObjStudyProgramme-Objects to ilObjStudyProgrammeCollections.");
53 }
54
55 parent::offsetSet($index, $newval);
56 }

References typeCheck().

+ Here is the call graph for this function:

◆ typeCheck()

ilObjStudyProgrammeCollection::typeCheck (   $value)
protected

Check the type of the given value against ilObjStudyProgramme.

Parameters
$value
Returns
bool

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

78 {
79 if($value instanceof ilObjStudyProgramme) {
80 return true;
81 }
82 return false;
83 }
Class ilObjStudyProgramme.

Referenced by append(), and offsetSet().

+ Here is the caller graph for this function:

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