hi again temm
I'm still not sure to really get the point.
I still think your method is way too complex and obfuscating, and you
should try to stick a bit more to the MVC techniques, and use the
standard features of Cake.
why "pre-rendering" your data in your controller ?
Why don't you just transmit the $data directly to your view, and let
it render it ?
++++++++
clemos
On 10/11/06, temm <[EMAIL PROTECTED]> wrote:
>
> thanks for help!!
> clemos, the main goal of this staf - i made class MyAppControler
> extends AppController with function
> function parseObjByData($data){
> $showrule = $this->showrule;
> $this->set('res', $data);
> ob_start();
> $this->render($showrule->getPattern(),'empty');
> $res = ob_get_contents();
> ob_end_clean();
> return $res;
> }
>
> and
> function parseObjByDataArr($data){
> $showrule = $this->showrule;
> $res=array();
> for($i=0;$i<count($data);$i++){
> $res[] = $this->parseObjByData($data[$i]);
> }
> return $res;
> }
> so for example in news controler i can say something like this
>
> class NewsController extends MyAppController
> {
> .....
> function showNewsAll($page=1){
> ......
> $this->set('res',$this->parseObjByDataArr($data);
> ......
> }
> .....
> }
> and all parsing i do this way...
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---