symfony API

sfInflector 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:

@package symfony

Method Summary

  • string camelize($lower_case_and_underscored_word)
    Returns a camelized string from a lower case and underscored string by replaceing slash with
  • string classify($table_name)
    Returns model class name for given database table.
  • string demodulize($class_name_in_module)
    Returns classname::module with classname:: stripped off.
  • strong foreign_key($class_name, $separate_with_underscore)
    Returns classname in underscored form, with "_id" tacked on at the end.
  • string humanize($lower_case_and_underscored_word)
    Returns a human-readable string from a lower case and underscored word by replacing underscores
  • string tableize($class_name)
    Returns corresponding table name for given classname.
  • string underscore($camel_cased_word)
    Returns an underscore-syntaxed version or the CamelCased string.

Method Details

  • (string) camelize ($lower_case_and_underscored_word) Browse code

    $lower_case_and_underscored_word String to camelize.

    Returns a camelized string from a lower case and underscored string by replaceing slash with

    double-colon and upper-casing each letter preceded by an underscore.

    returns Camelized string.

  • (string) classify ($table_name) Browse code

    $table_name Table name.

    Returns model class name for given database table.

    returns Classified table name.

  • (string) demodulize ($class_name_in_module) Browse code

    $class_name_in_module Classname and module pair.

    Returns classname::module with classname:: stripped off.

    returns Module name.

  • (strong) foreign_key ($class_name, $separate_with_underscore) Browse code

    $class_name Class name.
    $separate_with_underscore Separate with underscore.

    Returns classname in underscored form, with "_id" tacked on at the end.

    This is for use in dealing with foreign keys in the database.

    returns Foreign key

  • (string) humanize ($lower_case_and_underscored_word) Browse code

    $lower_case_and_underscored_word String to make more readable.

    Returns a human-readable string from a lower case and underscored word by replacing underscores

    with a space, and by upper-casing the initial characters.

    returns Human-readable string.

  • (string) tableize ($class_name) Browse code

    $class_name Name of class to get database table name for.

    Returns corresponding table name for given classname.

    returns Name of the databse table for given class.

  • (string) underscore ($camel_cased_word) Browse code

    $camel_cased_word String to underscore.

    Returns an underscore-syntaxed version or the CamelCased string.

    returns Underscored string.