Re: [SMARTY-DEV] feature request: isa operator

From: Date: Wed, 18 Jun 2003 19:35:39 +0000
Subject: Re: [SMARTY-DEV] feature request: isa operator
References: 1  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-1618@lists.php.net to get a copy of this message
--- Monte Ohrt <monte@ispi.net> wrote: > So you are making the presumption that objects == business logic? I > don't think so. Objects are extremely useful but you have to be Exactly, isa DOES NOT imply business logic in the template. I should point out that a similar syntax is already available using PHP syntax: (PHP >4.2) {if is_a('PageBlock', $BLOCK)} But just as the "is" operator provides a cleaner syntax for Smarty users to evaluate integers, I feel "isa" is a useful sytntax for object evaluation. Objects are indeed part of Smarty and some very smart people happen to be using them in their template designs. > Now this isa stuff... I don't see its practicality for the core. If > you want it, build your own functions & prefilters. This is not about business logic and custom filters/functions are not a replacement for this because they ADD to the syntax, not simplify it. Recall, this is to allow templates to determine if they are capable of rendering a giving object, that is all. Oh well. xo boots __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com

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