Comments (7)
that's a sweet idea. so sick of
itemfrom core.
This is one of those cases where I'm not sure if it's not too specialized for the core. One the one hand it looks like something that is often needed, on the other hand I'm not sure if this is good practice and saves enough to warrat a specialized method. Strings meant for user output are in best-practice put into lang files, the Inflector is meant more for core usage to singularize model names and pluralize table names and stuff like that.
Also you'll stand a better chance of having this accepted by closing this and writing it yourself and doing a pull-request.
from core.
Not sure about this, its already pretty simple:
<?= count($items) > 1 ? 'items' : 'item' ?>
from core.
count(items) !== 1
Sent from my iPhone
On 10/05/2011, at 9:39 PM, philsturgeon [email protected] wrote:
Not sure about this, its already pretty simple:
1 ? 'items' : 'item' ?>Reply to this email directly or view it on GitHub:
#90 (comment)
from core.
$bar == 28?
from core.
28 items
1 item
0 items
Sent from my iPhone
On 10/05/2011, at 9:50 PM, philsturgeon [email protected] wrote:
$bar == 28?
Reply to this email directly or view it on GitHub:
#90 (comment)
from core.
Sorry if my quick-fire pseudo code contained bugs :p Either way, this is not something that needs a method, documentation, unit tests, etc.
from core.
Related Issues (20)
- \Cache::delete_all() using memcached driver not clearing all items HOT 8
- In SecurityException, set_token is always called with true. HOT 5
- Issue with Request_Curl HOT 3
- like fuel HOT 3
- Soap Trace Options HOT 1
- How do you guys do php8 compatibility checks ? HOT 2
- update PDO methods pls HOT 1
- How do I update my markdown class HOT 3
- bug php 8 HOT 1
- URI path present in _GET / Input::get() in case of PHP7+fpm HOT 6
- setcookie(): Passing null to parameter #5 ($domain) of type string is deprecated PHP 8.1 HOT 1
- strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in PHP 8.1
- PHP 8.1 - Automatic conversion of false to array is deprecated in COREPATH/classes/config/file.php on line 105
- PHP8 OR LATER HOT 6
- Any plan to make a new release? HOT 11
- Profiler options HOT 1
- ORM count() returns incorrect row number HOT 9
- composite primary keys in CRUD HOT 5
- PHP 8.3 Problem with View Class : COREPATH/classes/view.php @ line 586 HOT 1
- is_resource check doesn't seem to work in PHP 8.1+ on FTP connections HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.