symfony API

sfChoiceFormat Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.3 API OpenSearch

Packages

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

sfChoiceFormat class.

Method Summary

  • string format($string, $number)
    For the choice string, and a number, find and return the string that satisfied the set within the choices.
  • boolean isValid($number, $set)
    Determines if the given number belongs to a given set
  • isValidSetNotation()
  • array parse($string)
    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 ($string, $number) Browse code

    $string the choices string.
    $number the number to test.

    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 ($number, $set) Browse code

    $number the number to test.
    $set the set, in set notation.

    Determines if the given number belongs to a given set

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

  • isValidSetNotation () Browse code

  • (array) parse ($string) Browse code

    $string the string containing the choices

    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.