[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/doctrine/inflector/lib/Doctrine/Inflector/ -> Inflector.php (summary)

(no description)

File Size: 507 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Inflector:: (10 methods):
  __construct()
  tableize()
  classify()
  camelize()
  capitalize()
  seemsUtf8()
  unaccent()
  urlize()
  singularize()
  pluralize()


Class: Inflector  - X-Ref

__construct(WordInflector $singularizer, WordInflector $pluralizer)   X-Ref
No description

tableize(string $word)   X-Ref
Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.


classify(string $word)   X-Ref
Converts a word into the format for a Doctrine class name. Converts 'table_name' to 'TableName'.


camelize(string $word)   X-Ref
Camelizes a word. This uses the classify() method and turns the first character to lowercase.


capitalize(string $string, string $delimiters = " \n\t\r\0\x0B-")   X-Ref
Uppercases words with configurable delimiters between words.

Takes a string and capitalizes all of the words, like PHP's built-in
ucwords function. This extends that behavior, however, by allowing the
word delimiters to be configured, rather than only separating on
whitespace.

Here is an example:
<code>
<?php
$string = 'top-o-the-morning to all_of_you!';
echo $inflector->capitalize($string);
// Top-O-The-Morning To All_of_you!

echo $inflector->capitalize($string, '-_ ');
// Top-O-The-Morning To All_Of_You!
?>
</code>

param: string $string     The string to operate on.
param: string $delimiters A list of word separators.
return: string The string with all delimiter-separated words capitalized.

seemsUtf8(string $string)   X-Ref
Checks if the given string seems like it has utf8 characters in it.

param: string $string The string to check for utf8 characters in.

unaccent(string $string)   X-Ref
Remove any illegal characters, accents, etc.

param: string $string String to unaccent
return: string Unaccented string

urlize(string $string)   X-Ref
Convert any passed string to a url friendly string.
Converts 'My first blog post' to 'my-first-blog-post'

param: string $string String to urlize.
return: string Urlized string.

singularize(string $word)   X-Ref
Returns a word in singular form.

param: string $word The word in plural form.
return: string The word in singular form.

pluralize(string $word)   X-Ref
Returns a word in plural form.

param: string $word The word in singular form.
return: string The word in plural form.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer