<?php namespace Ctct\Components\Tracking; class TrackingActivity { public $results = array(); public $next; public function __construct(array $results, array $pagination) { $this->results = $results; if (array_key_exists('next', $pagination)) { $this->next = substr($pagination['next'], strrpos($pagination['next'], '&next=') + 6); } } } 