Thursday, March 26, 2009

Re: Override View::_render()

I think you need a "render" method (without the underscore).

-Matt
http://www.pseudocoder.com

On Mar 26, 2:10 pm, AbraCadaver <shawn.mcken...@gmail.com> wrote:
> Trying to override _render() to make a simple template parser.  Cake
> will load my  view class but doesn't use the _render() method.  Below
> is my test.  My view never dies.  If I add the die before the class
> def then it does die so I know the file is being included:
>
> app/views/simple.php
> <?php
> class SimpleView extends View {
>
>     function _render($___viewFn, $___dataForView, $loadHelpers = true,
> $cached = false) {
>         die();
>     }}
>
> ?>
>
> app/app_controller.php
> <?php
> class AppController extends Controller {
>
>         var $view = 'Simple';
>
> }
>
> ?>
>
> Thanks!
> -Shawn
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: