final class AggregateTracker implements TrackerManagerInterface, ApplicationAwareInterface (View source)

Class PolyTracker A tracker that employes \Illuminate\Support\Manager to keep track of a list of Trackers.

When ::track is called, PolyTracker forwards the call to each of its drivers.

Traits

Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface

Properties

protected Application $app from  ApplicationAwareTrait
protected TrackerInterface[] $trackers
protected callable[] $creators
protected string[] $map

Methods

setApplication(Application $app)

Setter method for the application

track(TrackableInterface $trackable)

Track a trackable object Any object could be passed to this method so long as it implements TrackableInterface

forget(TrackableInterface $trackable)

Forget a trackable object Any object could be passed to this method so long as it implements TrackableInterface

addTracker(string $tracker, callable $creator)

Register a custom tracker creator Closure.

tracker($tracker)

Get a tracker by handle

Details

setApplication(Application $app)

Setter method for the application

Parameters

Application $app

TrackerInterface|TrackerInterface track(TrackableInterface $trackable)

Track a trackable object Any object could be passed to this method so long as it implements TrackableInterface

Parameters

TrackableInterface $trackable

Return Value

TrackerInterface|TrackerInterface

TrackerInterface|TrackerInterface forget(TrackableInterface $trackable)

Forget a trackable object Any object could be passed to this method so long as it implements TrackableInterface

Parameters

TrackableInterface $trackable

Return Value

TrackerInterface|TrackerInterface

TrackerManagerInterface addTracker(string $tracker, callable $creator)

Register a custom tracker creator Closure.

Parameters

string $tracker

The handle of the tracker

callable $creator

The callable responsible for returning the new tracker instance

Return Value

TrackerManagerInterface

TrackerInterface tracker($tracker)

Get a tracker by handle

Parameters

$tracker

Return Value

TrackerInterface

private Generator|TrackerInterface[] getTrackerGenerator()

No description

Return Value

Generator|TrackerInterface[]