ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCronJobEntities Class Reference

Class ilCronJobEntities. More...

+ Inheritance diagram for ilCronJobEntities:
+ Collaboration diagram for ilCronJobEntities:

Public Member Functions

 __construct (array $jobs=[])
 ilCronJobs constructor. More...
 
 getIterator ()
 
 count ()
 
 add (ilCronJobEntity $job)
 
Parameters
ilCronJobEntity$job
More...
 
 filter (callable $callable)
 Returns all the elements of this collection that satisfy the predicate $callable.
Parameters
callable$callable
Returns
self
More...
 
 slice (int $offset, ?int $length=null)
 Extracts a slice of $length elements starting at position $offset from the Collection.If $length is null it returns all elements from $offset to the end of the Collection. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on.

Parameters
int$offsetThe offset to start from.
int | null$lengthThe maximum number of elements to return, or null for no limit.
Returns
self
More...
 
 toArray ()
 
Returns
ilCronJobEntity[]
More...
 

Private Attributes

 $jobs
 

Detailed Description

Class ilCronJobEntities.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 8 of file class.ilCronJobEntities.php.

Constructor & Destructor Documentation

◆ __construct()

ilCronJobEntities::__construct ( array  $jobs = [])

ilCronJobs constructor.

Parameters
array$jobs

Definition at line 17 of file class.ilCronJobEntities.php.

References $jobs.

18  {
19  $this->jobs = new ArrayIterator($jobs);
20  }

Member Function Documentation

◆ add()

ilCronJobEntities::add ( ilCronJobEntity  $job)

Parameters
ilCronJobEntity$job

Implements ilCronJobCollection.

Definition at line 41 of file class.ilCronJobEntities.php.

41  : void
42  {
43  $this->jobs->append($job);
44  }

◆ count()

ilCronJobEntities::count ( )

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

34  {
35  return iterator_count($this);
36  }

◆ filter()

ilCronJobEntities::filter ( callable  $callable)

Returns all the elements of this collection that satisfy the predicate $callable.

Parameters
callable$callable
Returns
self

Implements ilCronJobCollection.

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

50  {
51  return new static(array_filter(iterator_to_array($this), $callable));
52  }
Class ilCronJobCollection.

◆ getIterator()

ilCronJobEntities::getIterator ( )

Definition at line 25 of file class.ilCronJobEntities.php.

References $jobs.

26  {
27  return $this->jobs;
28  }

◆ slice()

ilCronJobEntities::slice ( int  $offset,
?int  $length = null 
)

Extracts a slice of $length elements starting at position $offset from the Collection.If $length is null it returns all elements from $offset to the end of the Collection. Calling this method will only return the selected slice and NOT change the elements contained in the collection slice is called on.

Parameters
int$offsetThe offset to start from.
int | null$lengthThe maximum number of elements to return, or null for no limit.
Returns
self

Implements ilCronJobCollection.

Definition at line 57 of file class.ilCronJobEntities.php.

58  {
59  return new static(array_slice(iterator_to_array($this), $offset, $length, true));
60  }
Class ilCronJobCollection.

◆ toArray()

ilCronJobEntities::toArray ( )

Returns
ilCronJobEntity[]

Implements ilCronJobCollection.

Definition at line 65 of file class.ilCronJobEntities.php.

65  : array
66  {
67  return iterator_to_array($this);
68  }

Field Documentation

◆ $jobs

ilCronJobEntities::$jobs
private

Definition at line 11 of file class.ilCronJobEntities.php.

Referenced by __construct(), and getIterator().


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