ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=0);
20
22
23use ilDateTime;
38
39class 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(
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
75 ): CombinedInfoInterface {
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
87 ): ObjectDataInfoInterface {
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}
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
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
objectData(int $object_id, string $title, string $description, string $type)
Definition: Factory.php:82
@classDescription Date and time handling
return['delivery_method'=> 'php',]
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...