items = empty($items) ? array() : $items; $this->totalItems = count($items); $this->url = $url; } /** * Get the total number of items in the collection * * @return int total the total */ public function getTotalItems() { $this->totalItems = count($items); return $this->totalItems; } }