Inflector - humanize & underscore |
[eluser]Phil Sturgeon[/eluser]
They seem to break when only word is sent in. Code: echo humanize('foo'); // outputs nothing My reccomendation to the team is to use my str_replace based functions instead. Its the most simply of changes but seems to work where the preg_replace ones dont. Code: // -------------------------------------------------------------------- Meanwhile if anyone else has this problem, just throw this into a custom /application/helpers/inflector_helper.php
[eluser]Derek Allard[/eluser]
Thanks. Could you throw a report into the bug tracker for us?
[eluser]roosterboy[/eluser]
But the preg_replace call is necessary to handle multiple consecutive whitespace characters and convert them into a single underscore (or vice versa). thepyromaniac, are you sure nothing else is going on with your code? I have no trouble with the following: Code: echo humanize( 'foo' ); //outputs Foo
[eluser]esra[/eluser]
I'm not positive about this, but I believe that the original inflector code was based on a prerelease version of the inflector used for the Akelos framework. I seem to remember a post from Rick about this last summer. The inflector code was placed in the public domain long before the actual Akelos framework was released. I'm wondering if this issue was resolved in the release version of Akelos or later versions.
[eluser]Derek Jones[/eluser]
If you are able to duplicate this problem (I also am not), please post to the Bug Tracker, and include your OS, PHP Version, and PCRE library version. |
Welcome Guest, Not a member yet? Register Sign In |