1 Ext.data.JsonP.Ext_util_Inflector({
17 "href": "Inflector.html#Ext-util-Inflector-method-classify",
18 "shortDoc": "Returns the correct Model name for a given string. ...",
20 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
26 "doc": "<p>The word to classify</p>\n",
31 "owner": "Ext.util.Inflector",
32 "doc": "<p>Returns the correct <a href=\"#/api/Ext.data.Model\" rel=\"Ext.data.Model\" class=\"docClass\">Model</a> name for a given string. Mostly used internally by the data\npackage</p>\n",
36 "doc": "<p>The classified version of the word</p>\n"
38 "html_filename": "Inflector.html"
45 "href": "Inflector.html#Ext-util-Inflector-method-clearPlurals",
46 "shortDoc": "Removes all registered pluralization rules ...",
48 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
53 "name": "clearPlurals",
54 "owner": "Ext.util.Inflector",
55 "doc": "<p>Removes all registered pluralization rules</p>\n",
61 "html_filename": "Inflector.html"
68 "href": "Inflector.html#Ext-util-Inflector-method-clearSingulars",
69 "shortDoc": "Removes all registered singularization rules ...",
71 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
76 "name": "clearSingulars",
77 "owner": "Ext.util.Inflector",
78 "doc": "<p>Removes all registered singularization rules</p>\n",
84 "html_filename": "Inflector.html"
91 "href": "Inflector.html#Ext-util-Inflector-method-isTransnumeral",
92 "shortDoc": "Returns true if the given word is transnumeral (the word is its own singular and plural form - e.g. ...",
94 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
100 "doc": "<p>The word to test</p>\n",
104 "name": "isTransnumeral",
105 "owner": "Ext.util.Inflector",
106 "doc": "<p>Returns true if the given word is transnumeral (the word is its own singular and plural form - e.g. sheep, fish)</p>\n",
110 "doc": "<p>True if the word is transnumeral</p>\n"
112 "html_filename": "Inflector.html"
119 "href": "Inflector.html#Ext-util-Inflector-method-ordinalize",
120 "shortDoc": "Ordinalizes a given number by adding a prefix such as 'st', 'nd', 'rd' or 'th' based on the last digit of the\nnumber. ...",
122 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
128 "doc": "<p>The number to ordinalize</p>\n",
132 "name": "ordinalize",
133 "owner": "Ext.util.Inflector",
134 "doc": "<p>Ordinalizes a given number by adding a prefix such as 'st', 'nd', 'rd' or 'th' based on the last digit of the\nnumber. 21 -> 21st, 22 -> 22nd, 23 -> 23rd, 24 -> 24th etc</p>\n",
138 "doc": "<p>The ordinalized number</p>\n"
140 "html_filename": "Inflector.html"
147 "href": "Inflector.html#Ext-util-Inflector-method-plural",
148 "shortDoc": "Adds a new pluralization rule to the Inflector. ...",
150 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
156 "doc": "<p>The matcher regex</p>\n",
162 "doc": "<p>The replacement string, which can reference matches from the matcher argument</p>\n",
167 "owner": "Ext.util.Inflector",
168 "doc": "<p>Adds a new pluralization rule to the Inflector. See the intro docs for more information</p>\n",
174 "html_filename": "Inflector.html"
181 "href": "Inflector.html#Ext-util-Inflector-method-pluralize",
182 "shortDoc": "Returns the pluralized form of a word (e.g. ...",
184 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
190 "doc": "<p>The word to pluralize</p>\n",
195 "owner": "Ext.util.Inflector",
196 "doc": "<p>Returns the pluralized form of a word (e.g. Ext.util.Inflector.pluralize('word') returns 'words')</p>\n",
200 "doc": "<p>The pluralized form of the word</p>\n"
202 "html_filename": "Inflector.html"
209 "href": "Inflector.html#Ext-util-Inflector-method-singular",
210 "shortDoc": "Adds a new singularization rule to the Inflector. ...",
212 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
218 "doc": "<p>The matcher regex</p>\n",
224 "doc": "<p>The replacement string, which can reference matches from the matcher argument</p>\n",
229 "owner": "Ext.util.Inflector",
230 "doc": "<p>Adds a new singularization rule to the Inflector. See the intro docs for more information</p>\n",
236 "html_filename": "Inflector.html"
243 "href": "Inflector.html#Ext-util-Inflector-method-singularize",
244 "shortDoc": "Returns the singularized form of a word (e.g. ...",
246 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
252 "doc": "<p>The word to singularize</p>\n",
256 "name": "singularize",
257 "owner": "Ext.util.Inflector",
258 "doc": "<p>Returns the singularized form of a word (e.g. Ext.util.Inflector.singularize('words') returns 'word')</p>\n",
262 "doc": "<p>The singularized form of the word</p>\n"
264 "html_filename": "Inflector.html"
290 "href": "Inflector.html#Ext-util-Inflector",
297 "filename": "/mnt/ebs/nightly/git/SDK/platform/src/util/Inflector.js",
299 "alternateClassNames": [
302 "name": "Ext.util.Inflector",
303 "doc": "<p>General purpose inflector class that <a href=\"#/api/Ext.util.Inflector-method-pluralize\" rel=\"Ext.util.Inflector-method-pluralize\" class=\"docClass\">pluralizes</a>, <a href=\"#/api/Ext.util.Inflector-method-singularize\" rel=\"Ext.util.Inflector-method-singularize\" class=\"docClass\">singularizes</a> and \n<a href=\"#/api/Ext.util.Inflector-method-ordinalize\" rel=\"Ext.util.Inflector-method-ordinalize\" class=\"docClass\">ordinalizes</a> words. Sample usage:</p>\n\n\n\n\n<pre><code>//turning singular words into plurals\nExt.util.Inflector.pluralize('word'); //'words'\nExt.util.Inflector.pluralize('person'); //'people'\nExt.util.Inflector.pluralize('sheep'); //'sheep'\n\n//turning plurals into singulars\nExt.util.Inflector.singularize('words'); //'word'\nExt.util.Inflector.singularize('people'); //'person'\nExt.util.Inflector.singularize('sheep'); //'sheep'\n\n//ordinalizing numbers\nExt.util.Inflector.ordinalize(11); //\"11th\"\nExt.util.Inflector.ordinalize(21); //\"21th\"\nExt.util.Inflector.ordinalize(1043); //\"1043rd\"\n</code></pre>\n\n\n\n\n<p><u>Customization</u></p>\n\n\n\n\n<p>The Inflector comes with a default set of US English pluralization rules. These can be augmented with additional\nrules if the default rules do not meet your application's requirements, or swapped out entirely for other languages.\nHere is how we might add a rule that pluralizes \"ox\" to \"oxen\":</p>\n\n\n\n\n<pre><code>Ext.util.Inflector.plural(/^(ox)$/i, \"$1en\");\n</code></pre>\n\n\n\n\n<p>Each rule consists of two items - a regular expression that matches one or more rules, and a replacement string.\nIn this case, the regular expression will only match the string \"ox\", and will replace that match with \"oxen\". \nHere's how we could add the inverse rule:</p>\n\n\n\n\n<pre><code>Ext.util.Inflector.singular(/^(ox)en$/i, \"$1\");\n</code></pre>\n\n\n\n\n<p>Note that the ox/oxen rules are present by default.</p>\n\n",
311 "html_filename": "Inflector.html",