1 | <?php |
||
30 | class TrackerFactory |
||
31 | { |
||
32 | /** |
||
33 | * @var array|EventSubscriberInterface[] |
||
34 | */ |
||
35 | private $defaultSubscribers; |
||
36 | |||
37 | /** |
||
38 | * Constructor |
||
39 | * |
||
40 | * @param EventSubscriberInterface[] $defaultSubscribers |
||
41 | */ |
||
42 | public function __construct(array $defaultSubscribers = []) |
||
46 | |||
47 | /** |
||
48 | * Build a new Tracker instance |
||
49 | * |
||
50 | * If $extraSubscribers is not empty, those subscribers will be added |
||
51 | * to the Tracker in addition to the defaults. |
||
52 | * |
||
53 | * @param int $numItems The total number of items (or -1 for unknown) |
||
54 | * @param array|EventSubscriberInterface[] $extraSubscribers Optionally specify extra listeners for this Tracker instance |
||
55 | * @return Tracker |
||
56 | */ |
||
57 | public function buildTracker($numItems = Tracker::UNKNOWN, array $extraSubscribers = []) |
||
67 | } |
||
68 |