PageArray/WireArray


PageArray only

  • $a->getTotal()

    Get the total number of pages that were found from a $pages->find("selectors, limit=n") operation that led to this PageArray. The number returned may be greater than the number of pages actually in this PageArray instance, and is used for calculating pagination. Whereas $p->count() will always return the number of pages actually in this PageArray instance.

  • $a->setTotal($n)

    Manually set the total number of pages in this PageArray. Used for calculating pagination.

  • $a->getLimit()

    Get the number (n) from a "limit=n" portion of a selector that resulted in this PageArray. In pagination, this value represents the max items to display per page. If there was no limit applied, this will return 0.

  • $a->setLimit($n)

    Set the imposed limit on this PageArray. Used for pagination.

  • $a->getStart()

    Get the number of the starting result that led to this PageArray in pagination. Returns 0 if in the first page of results.

  • $a->setStart($n)

    Set the 'start' limiter that resulted in this PageArray. Used in pagination.

  • $a->getSelectors()

    Return the Selectors that led to this PageArray, or null if not set/applicable. Returns an instance of Selectors (WireArray) containing one or more Selector objects.