ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection Class Reference

Class ResourceCollection. More...

+ Collaboration diagram for ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection:

Public Member Functions

 __construct (ResourceCollectionIdentification $identification, int $owner, string $title)
 
 getIdentification ()
 
 hasSpecificOwner ()
 
 getOwner ()
 
 getTitle ()
 
 add (ResourceIdentification $identification)
 
 remove (ResourceIdentification $identification)
 
 isIn (ResourceIdentification $identification)
 
 getResourceIdentifications ()
 
 count ()
 
 clear ()
 

Data Fields

const NO_SPECIFIC_OWNER = -1
 

Private Attributes

array $resource_identifications = []
 
string $title = 'default'
 
ResourceCollectionIdentification $identification
 
int $owner
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::__construct ( ResourceCollectionIdentification  $identification,
int  $owner,
string  $title 
)

Member Function Documentation

◆ add()

◆ clear()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::clear ( )

Definition at line 111 of file ResourceCollection.php.

Referenced by ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\Sorter\AbstractBaseSorter\sort().

111  : void
112  {
113  $this->resource_identifications = [];
114  }
+ Here is the caller graph for this function:

◆ count()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::count ( )

Definition at line 106 of file ResourceCollection.php.

106  : int
107  {
108  return count($this->resource_identifications);
109  }

◆ getIdentification()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::getIdentification ( )

◆ getOwner()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::getOwner ( )

◆ getResourceIdentifications()

◆ getTitle()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::getTitle ( )

◆ hasSpecificOwner()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::hasSpecificOwner ( )

Definition at line 57 of file ResourceCollection.php.

57  : bool
58  {
59  return $this->owner !== self::NO_SPECIFIC_OWNER;
60  }

◆ isIn()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::isIn ( ResourceIdentification  $identification)

Definition at line 88 of file ResourceCollection.php.

References ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().

Referenced by ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection\add().

88  : bool
89  {
90  foreach ($this->resource_identifications as $i) {
91  if ($i->serialize() === $identification->serialize()) {
92  return true;
93  }
94  }
95  return false;
96  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::remove ( ResourceIdentification  $identification)

Definition at line 80 of file ResourceCollection.php.

References ILIAS\ResourceStorage\Identification\AbstractIdentification\serialize().

80  : void
81  {
82  $this->resource_identifications = array_filter(
83  $this->resource_identifications,
84  fn(ResourceIdentification $i): bool => $i->serialize() !== $identification->serialize()
85  );
86  }
+ Here is the call graph for this function:

Field Documentation

◆ $identification

◆ $owner

int ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::$owner
private

◆ $resource_identifications

array ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::$resource_identifications = []
private

◆ $title

string ILIAS\Export\ImportHandler\Parser\NodeInfo\Collection\ResourceCollection::$title = 'default'
private

◆ NO_SPECIFIC_OWNER


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