symfony API

sfChoiceFormat Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.0 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfChoiceFormat class.

Method Summary

  • string format(, )
    For the choice string, and a number, find and return the string that satisfied the set within the choices.
  • boolean isValid(, )
    Determines if the given number belongs to a given set
  • array parse()
    Parses a choice string and get a list of sets and a list of strings corresponding to the sets.
  • __construct()
    Constructor.

Method Details

  • (string) format (, ) Browse code

    For the choice string, and a number, find and return the string that satisfied the set within the choices.

    returns the choosen string.

  • (boolean) isValid (, ) Browse code

    Determines if the given number belongs to a given set

    returns true if number is in the set, false otherwise.

  • (array) parse () Browse code

    Parses a choice string and get a list of sets and a list of strings corresponding to the sets.

    returns array($sets, $strings)

  • __construct () Browse code

    Constructor.