Hi Markus,

this is due to compatibility reasons for old OXID templates which did not use 
getters at all.
It will be removed soon ... - I hope! ;-)

There was already a discussion about that stuff here on the list some weeks 
ago. Have a look at the digest.

Beste Grüße aus Dortmund! 
Andreas Ziethen | Geschäftsführung 

-- 

anzido GmbH 
Kirchhörder Str. 12 
44229 Dortmund 
Tel.: 0231 - 60 71 079 
Fax.: 0231 - 60 71 081 
Mobil:0176 - 8325 1488 
Email: i...@anzido.com 
Web: http://www.anzido.com ( http://www.anzido.com/ ) 

USt-ID: DE257982972 
Geschäftsführung: Andreas Ziethen 
Amtsgericht Dortmund HRB 20883
-----Ursprüngliche Daten-----
Datum: 20.05.2010 13:00:47
Von: dasGollum <dasgol...@web.de>
An: <dev-general@lists.oxidforge.org>
Betreff: [oxid-dev-general] Views|public methods
Vorgang: T-L2DDW4THKR-78

> Hi all,
> 
> I wondering of some for me useless code in the views.
> 
> Eg.:
> class Details extends oxUBase
> {
>     public function render()
>     {
>          ...
>         $this->_aViewData['aZoomPics'] = $this->getZoomPics();
>          ...
>     }
> }
> 
> With this code the pictures can be handle in the template.
> 
> But Details::getZoomPics() is public and will be executed in the template, 
> too.
> [{assign var="aZoomPics" value=$oView->getZoomPics() }]
> 
> In the template return the $this->_aPicGallery array.
> So it don't executes twice, just [{$aZoomPic}] filled twice.
> 
> 
> But, why this is previous executed in the view itself.
> 
> My thinking is, if I make a own Template and don't need zoomPics or whatever.
> I don't wanne execute it. If I need it, i execute it in the Template, like 
> now.
> 
> So if the view don't execute public functions, some templates are faster.
> 
> This practice is a lot in views and templates.
> 
> What you think?
> 
> Regards,
> Markus
> 
> 
> -- 
> ----------------------------
> Markus Bauer
> 
> Paseo del Retiro 3 B
> 11380 Tarifa/Cadiz
> 
> España
> 
> N.I.E.: ES-Y0317721-J
> 
> ----------------------------
> Tel./Fax: +34 956682237
> eMail: markus.ba...@coyop.de
> www: www.coyop.de
> 
> ----------------------------
> 
> 
> _______________________________________________
> dev-general mailing list
> dev-general@lists.oxidforge.org
> http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
dev-general@lists.oxidforge.org
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to