X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdoctrine%2Finflector%2Flib%2FDoctrine%2FCommon%2FInflector%2FInflector.php;fp=vendor%2Fdoctrine%2Finflector%2Flib%2FDoctrine%2FCommon%2FInflector%2FInflector.php;h=3a951af8d4a43d88f1b8aeed56c8221ef4ebe7fa;hp=a53828aba95d0569788ff411ef0d5750f6284c4c;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php index a53828aba..3a951af8d 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -49,7 +49,7 @@ class Inflector '/(matr|vert|ind)(ix|ex)$/i' => '\1ices', '/(x|ch|ss|sh)$/i' => '\1es', '/([^aeiouy]|qu)y$/i' => '\1ies', - '/(hive)$/i' => '\1s', + '/(hive|gulf)$/i' => '\1s', '/(?:([^f])fe|([lr])f)$/i' => '\1\2ves', '/sis$/i' => 'ses', '/([ti])um$/i' => '\1a', @@ -67,7 +67,16 @@ class Inflector '/$/' => 's', ), 'uninflected' => array( - '.*[nrlm]ese', '.*deer', '.*fish', '.*measles', '.*ois', '.*pox', '.*sheep', 'people', 'cookie' + '.*[nrlm]ese', + '.*deer', + '.*fish', + '.*measles', + '.*ois', + '.*pox', + '.*sheep', + 'people', + 'cookie', + 'police', ), 'irregular' => array( 'atlas' => 'atlases', @@ -76,6 +85,7 @@ class Inflector 'brother' => 'brothers', 'cafe' => 'cafes', 'chateau' => 'chateaux', + 'niveau' => 'niveaux', 'child' => 'children', 'cookie' => 'cookies', 'corpus' => 'corpuses', @@ -95,6 +105,7 @@ class Inflector 'hoof' => 'hoofs', 'human' => 'humans', 'iris' => 'irises', + 'larva' => 'larvae', 'leaf' => 'leaves', 'loaf' => 'loaves', 'man' => 'men', @@ -112,6 +123,7 @@ class Inflector 'octopus' => 'octopuses', 'opus' => 'opuses', 'ox' => 'oxen', + 'passerby' => 'passersby', 'penis' => 'penises', 'person' => 'people', 'plateau' => 'plateaux', @@ -161,6 +173,7 @@ class Inflector '/(tive)s$/i' => '\1', '/(hive)s$/i' => '\1', '/(drive)s$/i' => '\1', + '/(dive)s$/i' => '\1', '/([^fo])ves$/i' => '\1fe', '/(^analy)ses$/i' => '\1sis', '/(analy|diagno|^ba|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => '\1\2sis', @@ -183,8 +196,12 @@ class Inflector '.*pox', '.*sheep', '.*ss', + 'police', + 'pants', + 'clothes', ), 'irregular' => array( + 'caches' => 'cache', 'criteria' => 'criterion', 'curves' => 'curve', 'emphases' => 'emphasis', @@ -206,9 +223,9 @@ class Inflector 'Amoyese', 'bison', 'Borghese', 'bream', 'breeches', 'britches', 'buffalo', 'cantus', 'carp', 'chassis', 'clippers', 'cod', 'coitus', 'Congoese', 'contretemps', 'corps', 'debris', 'diabetes', 'djinn', 'eland', 'elk', 'equipment', 'Faroese', 'flounder', - 'Foochowese', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', + 'Foochowese', 'Furniture', 'gallows', 'Genevese', 'Genoese', 'Gilbertese', 'graffiti', 'headquarters', 'herpes', 'hijinks', 'Hottentotese', 'information', 'innings', - 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'mackerel', 'Maltese', '.*?media', + 'jackanapes', 'Kiplingese', 'Kongoese', 'Lucchese', 'Luggage', 'mackerel', 'Maltese', '.*?media', 'mews', 'moose', 'mumps', 'Nankingese', 'news', 'nexus', 'Niasese', 'Pekingese', 'Piedmontese', 'pincers', 'Pistoiese', 'pliers', 'Portuguese', 'proceedings', 'rabies', 'rice', 'rhinoceros', 'salmon', 'Sarawakese', 'scissors', @@ -252,7 +269,7 @@ class Inflector */ public static function classify($word) { - return str_replace(" ", "", ucwords(strtr($word, "_-", " "))); + return str_replace(' ', '', ucwords(strtr($word, '_-', ' '))); } /** @@ -404,7 +421,7 @@ class Inflector if (preg_match('/(.*)\\b(' . self::$plural['cacheIrregular'] . ')$/i', $word, $regs)) { self::$cache['pluralize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$plural['merged']['irregular'][strtolower($regs[2])], 1); - + return self::$cache['pluralize'][$word]; } @@ -457,7 +474,7 @@ class Inflector if (preg_match('/(.*)\\b(' . self::$singular['cacheIrregular'] . ')$/i', $word, $regs)) { self::$cache['singularize'][$word] = $regs[1] . substr($word, 0, 1) . substr(self::$singular['merged']['irregular'][strtolower($regs[2])], 1); - + return self::$cache['singularize'][$word]; }