Suggestion: make template commands case insensitive

From: Date: Wed, 23 Apr 2003 01:35:58 +0000
Subject: Suggestion: make template commands case insensitive
Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1254@lists.php.net to get a copy of this message
Hi folks ;) I told messju about this one a week ago, he hasn't answered yet, so I thought it would be better anyways to put this issue in here: Wouldn't it be logical to be able to do either {dowhatever} or {doWhatever} or {DoWhatever} or whatever ;)) PHP is case-insensitive with functions as well, so why not make Smarty the same? VARIABLES, of course, should remain case-sensitive, but one should be able to use his preferred notation for function/block/filter calls. I know there are underscores used within Smarty, but I personally prefer camel notation (whoWantsToLiveForever), and have a small class which extends smarty and automatically registers functions, blocks, filters etc embedded within this class. PHP's get_class_methods() returns lower-case method names, and as such they are registered in smarty - so I cannot do {displayMenu id="2"} in my templates, but instead I have to write {displaymenu...}... In my eyes, this simply makes no sense, and changing the responsible preg to "/i" wouldn't cause any compatibility issues, would it? ;) Regards, David

« previous php.smarty.dev (#1254) next »