symfony API

sfValidatorTime Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 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.

sfValidatorTime validates a time. It also converts the input value to a valid time.

Inheritence

sfValidatorTime  <  sfValidatorBase

Method Summary

Methods inherited from sfValidatorBase

addMessage , addOption , addRequiredOption , asString , clean , configure , doClean , getCharset , getDefaultMessages , getDefaultOptions , getEmptyValue , getErrorCodes , getMessage , getMessages , getMessagesWithoutDefaults , getOption , getOptions , getOptionsWithoutDefaults , getRequiredOptions , hasOption , isEmpty , setCharset , setDefaultMessages , setDefaultOptions , setMessage , setMessages , setOption , setOptions , __construct

Method Details

  • configure ($options, $messages) Browse code

    $options An array of options
    $messages An array of error messages

    Configures the current validator.


    Available options:

    * time_format: A regular expression that dates must match
    * time_output: The format to use when returning a date with time (default to H:i:s)
    * time_format_error: The date format to use when displaying an error for a bad_format error

    Available error codes:

    * bad_format

  • (int) convertTimeArrayToTimestamp ($value) Browse code

    $value An array of date elements

    Converts an array representing a time to a timestamp.


    The array can contains the following keys: hour, minute, second

    returns A timestamp

  • doClean () Browse code

    @see sfValidatorBase

  • isEmpty () Browse code

    @see sfValidatorBase

  • isValueSet () Browse code