Perhaps I am going about this wrong and/or I do not understand the
correct syntax, but I had this working in php5 and then when I
transferred to a php4 box, it no longer functions.  In a nutshell this
is what I'm trying to do.

I have a helper:  test_helper.php

Class TestHelperHelper extends Helper{

        var $testVar;

        function setVar($item){
                $this->TestVar = $item;
        }
        function returnVar(){
                return $this->testVar;
        }
}


I have an element: testHelper.thtml which contains:

        echo $testHelper->returnVar();


My view contains:

        $testHelper->setVar('this is a test');
        echo $this->renderElement('testHelper');


Basically it will not print out anything from the element.  If I
setVar from within the element, it will work just fine, but it will
not access anything set from the view.  I imagine this is something to
do with scope and how PHP treats methods, but I'm just not sure how to
implement this correctly within cake.

Any help is most appreciated.


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to