ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=0);
20 
22 
23 use ilDateTime;
38 
39 class Factory implements InfoFactoryInterface
40 {
41  public function iterator(): IteratorFactoryInterface
42  {
43  return new IteratorFactory();
44  }
45 
46  public function lp(
47  int $user_id,
48  int $object_id,
49  int $lp_status,
50  int $percentage,
51  int $lp_mode,
52  int $spent_seconds,
53  ilDateTime $status_changed,
54  int $visits,
55  int $read_count,
56  bool $has_percentage
57  ): LPInfoInterface {
58  return new LPInfo(
59  $user_id,
60  $object_id,
61  $lp_status,
62  $percentage,
63  $lp_mode,
64  $spent_seconds,
65  $status_changed,
66  $visits,
67  $read_count,
68  $has_percentage
69  );
70  }
71 
72  public function combined(
73  LPInterface $lp_info,
74  ObjectDataInfoInterface $object_data_info
76  return new CombinedInfo(
77  $lp_info,
78  $object_data_info
79  );
80  }
81 
82  public function objectData(
83  int $object_id,
84  string $title,
85  string $description,
86  string $type
88  return new ObjectDataInfo(
89  $object_id,
90  $title,
91  $description,
92  $type
93  );
94  }
95 
96  public function view(
97  ObjectDataIteratorInterface $object_data_iterator,
98  LPIteratorInterface $lp_iterator,
99  CombinedIteratorInterface $combined_iterator
100  ): ViewInfoInterface {
101  return new ViewInfo(
102  $object_data_iterator,
103  $lp_iterator,
104  $combined_iterator
105  );
106  }
107 }
objectData(int $object_id, string $title, string $description, string $type)
Definition: Factory.php:82
lp(int $user_id, int $object_id, int $lp_status, int $percentage, int $lp_mode, int $spent_seconds, ilDateTime $status_changed, int $visits, int $read_count, bool $has_percentage)
Definition: Factory.php:46
combined(LPInterface $lp_info, ObjectDataInfoInterface $object_data_info)
Definition: Factory.php:72
view(ObjectDataIteratorInterface $object_data_iterator, LPIteratorInterface $lp_iterator, CombinedIteratorInterface $combined_iterator)
Definition: Factory.php:96