Skip to content
Andrea Zoellner edited this page Jul 30, 2015 · 2 revisions

Crew\Unsplash\ArrayObject

  • Class name: ArrayObject
  • Namespace: Crew\Unsplash
  • Parent class: ArrayObject

Constants

LAST

const LAST = 'last'

PREV

const PREV = 'prev'

NEXT

const NEXT = 'next'

FIRST

const FIRST = 'first'

LINK

const LINK = 'Link'

TOTAL

const TOTAL = 'X-Total'

PER_PAGE

const PER_PAGE = 'X-Per-Page'

Properties

$headers

private mixed $headers
  • Visibility: private

$pages

private mixed $pages
  • Visibility: private

$basePages

private mixed $basePages = array(self::LAST => null, self::PREV => null, self::NEXT => null, self::FIRST => null)
  • Visibility: private

Methods

__construct

mixed Crew\Unsplash\ArrayObject::__construct($input, $headers)
  • Visibility: public

Arguments

  • $input mixed
  • $headers mixed

totalPages

integer Crew\Unsplash\ArrayObject::totalPages()

Total page for this call.

  • Visibility: public

currentPage

integer Crew\Unsplash\ArrayObject::currentPage()

Current page number base on the Link header.

  • Visibility: public

getPages

array Crew\Unsplash\ArrayObject::getPages()

Retrieve array containing all pages for each position.

  • Visibility: public

generatePages

array Crew\Unsplash\ArrayObject::generatePages()

Return an array containing the page number for all positions: last, previous, next, first. If the page number for a specific position doesn't exist (i.e it is the current page), the position will return null.

  • Visibility: private

Api Index

Clone this wiki locally