Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

objekte zur laufzeit registrieren

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German
View previous topic :: View next topic  
Author Message
OneTwo
Smarty n00b


Joined: 01 Mar 2005
Posts: 2

PostPosted: Tue Mar 01, 2005 2:36 pm    Post subject: objekte zur laufzeit registrieren Reply with quote

wie kann man by smarty objekte zur laufzeit registrieren?

Bsp.:

template:

{ irgendeineFuktion assig="einObjekt" }

{ einObjekt->function }
//

in der Funtion "irgendeineFuktion" wird ein objekt erstellt und soll dann im template zur verfügung stehen.

Wie geht das?!?
Back to top
View user's profile Send private message
OneTwo
Smarty n00b


Joined: 01 Mar 2005
Posts: 2

PostPosted: Tue Mar 01, 2005 4:37 pm    Post subject: Reply with quote

habs selber gelöst, die frage ist nur, ob es wirklich so sauber ist?!?

hab eine compiler plugin gemacht, in der ich die register_object methode von dem compliler objekt verwende. dort erstelle ich nur sozusagen die objekt hülle, damit smarty beim parsen keine probleme bekommt, mit inhalt wird das objekt ert an der stelle gefüllt, wo es benötigt wird, wo ich dann die methode get_registert_object( "name des objektes" ) verwende, da ich nun eine referenz bekomme, kann ich einfach das selbe objekt entweder noch mal neu generieren oder wenn das objekt ein interface hat, sich selbst zu befüllen dann dies anwenden.

hat jemand noch ne andere idee?!?
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Language: German All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP