symfony API

sfRequestCompat10 Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.2 API OpenSearch

Packages

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

Method Summary

  • Boolean call($event)
    Adds 1.0 compatibility methods to the request object.
  • string getError((sfRequest) $request, $name)
    Retrieves an error message.
  • array getErrorNames((sfRequest) $request)
    Retrieves an array of error names.
  • array getErrors((sfRequest) $request)
    Retrieves an array of errors.
  • array getFile((sfRequest) $request, $name)
    Retrieves an array of file information.
  • int getFileError((sfRequest) $request, $name)
    Retrieves a file error.
  • string getFileExtension((sfRequest) $request, $name)
    Retrieves an extension for a given file.
  • string getFileName((sfRequest) $request, $name)
    Retrieves a file name.
  • array getFileNames((sfRequest) $request)
    Retrieves an array of file names.
  • string getFilePath((sfRequest) $request, $name)
    Retrieves a file path.
  • int getFileSize((sfRequest) $request, $name)
    Retrieve a file size.
  • string getFileType((sfRequest) $request, $name)
    Retrieves a file type.
  • string getFileValue((sfRequest) $request, $name, $key)
    Retrieves a file value.
  • array getFileValues((sfRequest) $request, $name)
    Retrieves all the values from a file.
  • bool hasError((sfRequest) $request, $name)
    Indicates whether or not an error exists.
  • bool hasErrors((sfRequest) $request)
    Indicates whether or not any errors exist.
  • bool hasFile((sfRequest) $request, $name)
    Indicates whether or not a file exists.
  • bool hasFileError((sfRequest) $request, $name)
    Indicates whether or not a file error exists.
  • bool hasFileErrors((sfRequest) $request)
    Indicates whether or not any file errors occured.
  • boolean hasFiles((sfRequest) $request)
    Indicates whether or not any files exist.
  • bool moveFile((sfRequest) $request, $name, $file, $fileMode = 0666, $create = true, $dirMode = 0777)
    Moves an uploaded file.
  • string removeError((sfRequest) $request, $name)
    Removes an error.
  • setError((sfRequest) $request, $name, $message)
    Sets an error.
  • setErrors((sfRequest) $request, $errors, $erros)
    Sets an array of errors

Method Details

  • (Boolean) call ($event) Browse code

    $event The event

    Adds 1.0 compatibility methods to the request object.

    returns true if the method has been found here, false otherwise

  • (string) getError ((sfRequest) $request, $name) Browse code

    $request A request object
    $name An error name

    Retrieves an error message.

    returns An error message, if the error exists, otherwise null

  • (array) getErrorNames ((sfRequest) $request) Browse code

    $request A request object

    Retrieves an array of error names.

    returns An indexed array of error names

  • (array) getErrors ((sfRequest) $request) Browse code

    $request A request object

    Retrieves an array of errors.

    returns An associative array of errors

  • (array) getFile ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves an array of file information.

    returns An associative array of file information, if the file exists, otherwise null

  • (int) getFileError ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves a file error.

    returns

    One of the following error codes:

    • UPLOAD_ERR_OK (no error)

    • UPLOAD_ERR_INI_SIZE (the uploaded file exceeds the upload_max_filesize directive in php.ini)

    • UPLOAD_ERR_FORM_SIZE (the uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form)

    • UPLOAD_ERR_PARTIAL (the uploaded file was only partially uploaded)

    • UPLOAD_ERR_NO_FILE (no file was uploaded)

  • (string) getFileExtension ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves an extension for a given file.

    returns Extension for the file

  • (string) getFileName ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file nam.

    Retrieves a file name.

    returns A file name, if the file exists, otherwise null

  • (array) getFileNames ((sfRequest) $request) Browse code

    $request A request object

    Retrieves an array of file names.

    returns An indexed array of file names

  • (string) getFilePath ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves a file path.

    returns A file path, if the file exists, otherwise null

  • (int) getFileSize ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieve a file size.

    returns A file size, if the file exists, otherwise null

  • (string) getFileType ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves a file type.


    This may not be accurate. This is the mime-type sent by the browser during the upload.

    returns A file type, if the file exists, otherwise null

  • (string) getFileValue ((sfRequest) $request, $name, $key) Browse code

    $request A request object
    $name A file name
    $key Value to search in the file

    Retrieves a file value.

    returns File value

  • (array) getFileValues ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Retrieves all the values from a file.

    returns Associative list of the file values

  • (bool) hasError ((sfRequest) $request, $name) Browse code

    $request A request object
    $name An error name

    Indicates whether or not an error exists.

    returns true, if the error exists, otherwise false

  • (bool) hasErrors ((sfRequest) $request) Browse code

    $request A request object

    Indicates whether or not any errors exist.

    returns true, if any error exist, otherwise false

  • (bool) hasFile ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Indicates whether or not a file exists.

    returns true, if the file exists, otherwise false

  • (bool) hasFileError ((sfRequest) $request, $name) Browse code

    $request A request object
    $name A file name

    Indicates whether or not a file error exists.

    returns true, if the file error exists, otherwise false

  • (bool) hasFileErrors ((sfRequest) $request) Browse code

    $request A request object

    Indicates whether or not any file errors occured.

    returns true, if any file errors occured, otherwise false

  • (boolean) hasFiles ((sfRequest) $request) Browse code

    $request A request object

    Indicates whether or not any files exist.

    returns true, if any files exist, otherwise false

  • (bool) moveFile ((sfRequest) $request, $name, $file, $fileMode = 0666, $create = true, $dirMode = 0777) Browse code

    $request A request object
    $name A file name
    $file An absolute filesystem path to where you would like the file moved. This includes the new filename as well, since uploaded files are stored with random names
    $fileMode The octal mode to use for the new file
    $create Indicates that we should make the directory before moving the file
    $dirMode The octal mode to use when creating the directory

    Moves an uploaded file.

    returns true, if the file was moved, otherwise false

    throws sfFileException If a major error occurs while attempting to move the file

  • (string) removeError ((sfRequest) $request, $name) Browse code

    $request A request object
    $name An error name

    Removes an error.

    returns An error message, if the error was removed, otherwise null

  • setError ((sfRequest) $request, $name, $message) Browse code

    $request A request object
    $name An error name
    $message An error message

    Sets an error.

  • setErrors ((sfRequest) $request, $errors, $erros) Browse code

    $request A request object
    $errors
    $erros An associative array of errors and their associated messages

    Sets an array of errors


    If an existing error name matches any of the keys in the supplied array, the associated message will be overridden.