Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

deferenced object call parsing problem (PHP5)
hello people,

I have a problem with accessing methods of dereferenced objects e.g.
(getValue() returns an object.)

{$Field->getValue()->getName()}

unfortunately Smarty_Compiler.class.php dies telling me its found an
unindentified tag; which sucks!

I have been trying to hack the Smarty_Compiler.class.php
(around line 164) in order to change the regular expression to allow
such syntax (and still allow arguments in each method call e.g.
$Field->getValue($x)->getName() )

I have had no luck.

Does anyone have a patch for this? any hints? Has anyone else had this
problem and/or tried to get it to work?

Can anyone say if this is expected to be 'fixed'**?

Hopefully I won't have to litter my templates with assign tags just to
get round this. e.g.

{assign var=Obj value=$Field->getValue()}
{$Obj->getName()}

regards,

Jochem.

---
** I realise this is not something that is broken per se, but it would
be great if the parser supported the new dereferenced syntax.

Report this thread to moderator Post Follow-up to this message
Old Post
Jochem Maas
03-19-04 06:28 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:52 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.