symfony API

sfPager Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

sfPager class.

Inheritence

sfPropelPager, sfDoctrinePager  <  sfPager

Method Summary

  • count()
    Returns the total number of results.
  • current()
    Returns the current result.
  • string getClass()
    Returns the current class.
  • mixed getCurrent()
    Returns the current object.
  • integer getCurrentMaxLink()
    Returns the current pager's max link.
  • integer getCursor()
    Returns the current cursor.
  • integer getFirstIndice()
    Returns the first index on the current page.
  • integer getFirstPage()
    Returns the first page number.
  • integer getLastIndice()
    Returns the last index on the current page.
  • integer getLastPage()
    Returns the last page number.
  • array getLinks($nb_links)
    Returns an array of page numbers to use in pagination links.
  • integer getMaxPerPage()
    Returns the maximum number of results per page.
  • integer getMaxRecordLimit()
    Returns the current pager's max record limit.
  • integer getNbResults()
    Returns the number of results.
  • mixed|null getNext()
    Returns the next object.
  • integer getNextPage()
    Returns the next page.
  • mixed getObjectByCursor($pos)
    Returns an object by cursor position.
  • integer getPage()
    Returns the current page.
  • mixed getParameter($name, $default)
    Returns a parameter.
  • sfParameterHolder getParameterHolder()
    Returns the current pager's parameter holder.
  • mixed|null getPrevious()
    Returns the previous object.
  • integer getPreviousPage()
    Returns the previous page.
  • array getResults()
    Returns an array of results on the given page.
  • boolean hasParameter($name)
    Checks whether a parameter has been set.
  • boolean haveToPaginate()
    Returns true if the current query requires pagination.
  • init()
    Initialize the pager.
  • initializeIterator()
    Loads data into properties used for iteration.
  • boolean isFirstPage()
    Returns true if on the first page.
  • boolean isIteratorInitialized()
    Returns true if the properties used for iteration have been initialized.
  • boolean isLastPage()
    Returns true if on the last page.
  • key()
    Returns the current key.
  • next()
    Advances the internal pointer and returns the current result.
  • resetIterator()
    Empties properties used for iteration.
  • mixed retrieveObject()
    Returns an object at a certain offset.
  • rewind()
    Resets the internal pointer and returns the current result.
  • setClass($class)
    Sets the current class.
  • setCursor($pos)
    Sets the current cursor.
  • setLastPage($page)
    Sets the last page number.
  • setMaxPerPage($max)
    Sets the maximum number of results per page.
  • setMaxRecordLimit($limit)
    Sets the current pager's max record limit.
  • setNbResults($nb)
    Sets the number of results.
  • setPage($page)
    Sets the current page.
  • setParameter($name, $value)
    Sets a parameter.
  • valid()
    Returns true if pointer is within bounds.
  • __construct($class, $maxPerPage)
    Constructor.

Method Details

  • count () Browse code

    Returns the total number of results.

  • current () Browse code

    Returns the current result.

  • (string) getClass () Browse code

    Returns the current class.

  • (mixed) getCurrent () Browse code

    Returns the current object.

  • (integer) getCurrentMaxLink () Browse code

    Returns the current pager's max link.

  • (integer) getCursor () Browse code

    Returns the current cursor.

  • (integer) getFirstIndice () Browse code

    Returns the first index on the current page.

  • (integer) getFirstPage () Browse code

    Returns the first page number.

  • (integer) getLastIndice () Browse code

    Returns the last index on the current page.

  • (integer) getLastPage () Browse code

    Returns the last page number.

  • (array) getLinks ($nb_links) Browse code

    $nb_links The maximum number of page numbers to return

    Returns an array of page numbers to use in pagination links.

  • (integer) getMaxPerPage () Browse code

    Returns the maximum number of results per page.

  • (integer) getMaxRecordLimit () Browse code

    Returns the current pager's max record limit.

  • (integer) getNbResults () Browse code

    Returns the number of results.

  • (mixed|null) getNext () Browse code

    Returns the next object.

  • (integer) getNextPage () Browse code

    Returns the next page.

  • (mixed) getObjectByCursor ($pos) Browse code

    Returns an object by cursor position.

  • (integer) getPage () Browse code

    Returns the current page.

  • (mixed) getParameter ($name, $default) Browse code

    Returns a parameter.

  • (sfParameterHolder) getParameterHolder () Browse code

    Returns the current pager's parameter holder.

  • (mixed|null) getPrevious () Browse code

    Returns the previous object.

  • (integer) getPreviousPage () Browse code

    Returns the previous page.

  • (array) getResults () Browse code

    Returns an array of results on the given page.

  • (boolean) hasParameter ($name) Browse code

    Checks whether a parameter has been set.

  • (boolean) haveToPaginate () Browse code

    Returns true if the current query requires pagination.

  • init () Browse code

    Initialize the pager.


    Function to be called after parameters have been set.

  • initializeIterator () Browse code

    Loads data into properties used for iteration.

  • (boolean) isFirstPage () Browse code

    Returns true if on the first page.

  • (boolean) isIteratorInitialized () Browse code

    Returns true if the properties used for iteration have been initialized.

  • (boolean) isLastPage () Browse code

    Returns true if on the last page.

  • key () Browse code

    Returns the current key.

  • next () Browse code

    Advances the internal pointer and returns the current result.

  • resetIterator () Browse code

    Empties properties used for iteration.

  • (mixed) retrieveObject () Browse code

    Returns an object at a certain offset.


    Used internally by {@link getCurrent()}.

  • rewind () Browse code

    Resets the internal pointer and returns the current result.

  • setClass ($class) Browse code

    Sets the current class.

  • setCursor ($pos) Browse code

    Sets the current cursor.

  • setLastPage ($page) Browse code

    Sets the last page number.

  • setMaxPerPage ($max) Browse code

    Sets the maximum number of results per page.

  • setMaxRecordLimit ($limit) Browse code

    Sets the current pager's max record limit.

  • setNbResults ($nb) Browse code

    Sets the number of results.

  • setPage ($page) Browse code

    Sets the current page.

  • setParameter ($name, $value) Browse code

    Sets a parameter.

  • valid () Browse code

    Returns true if pointer is within bounds.

  • __construct ($class, $maxPerPage) Browse code

    $class The model class
    $maxPerPage Number of records to display per page

    Constructor.