concrete/src/Statistics/UsageTracker/AggregateTracker.php
public function tracker($tracker)
    {
        // We've already made this tracker, so just return it.
        if ($cached = array_get($this->trackers, $tracker)) {
            return $cached;
        }

        // We've got a creator, lets create the tracker
        if ($creator = array_get($this->creators, $tracker)) {
            // Create through Container
            $created = $this->app->call($creator);

            $this->trackers[$tracker] = $created;
            unset($this->creators[$tracker]);

            return $created;
        }

        throw new InvalidArgumentException("Tracker [$tracker] not supported.");
    }
public function tracker($tracker)
    {
        // We've already made this tracker, so just return it.
        if ($cached = array_get($this->trackers, $tracker)) {
            return $cached;
        }

        // We've got a creator, lets create the tracker
        if ($creator = array_get($this->creators, $tracker)) {
            // Create through Container
            $created = $this->app->call($creator);

            $this->trackers[$tracker] = $created;
            unset($this->creators[$tracker]);

            return $created;
        }

        throw new InvalidArgumentException("Tracker [$tracker] not supported.");
    }
public function tracker ( $ tracker ) { // We've already made this tracker, so just return it. if ( $ cached = array_get ( $ this -> trackers , $ tracker ) ) { return $ cached ; } // We've got a creator, lets create the tracker if ( $ creator = array_get ( $ this -> creators , $ tracker ) ) { // Create through Container $ created = $ this -> app -> call ( $ creator ) ; $ this -> trackers [ $ tracker ] = $ created ; unset ( $ this -> creators [ $ tracker ] ) ; return $ created ; } throw new InvalidArgumentException ( "Tracker [$tracker] not supported." ) ; }
Get a tracker by handle
@param $tracker
@return TrackerInterface
Get a tracker by handle