Object Oriented Programming 101.

In order to access a property, you must first define it.

http://www.php.net/manual/en/language.oop5.properties.php

---------- Forwarded message ----------
From: "chris...@yahoo.com" <chris...@yahoo.com>
Date: Feb 8, 11:33 pm
Subject: error loading model on setup
To: CakePHP


Thank you John,

Now I have another problem:

    $this->menu = new Menu('nav');
    $this->user_menu = new Menu('user_nav');

which gives me an error:

Notice (8): Undefined property: CakeErrorController::$menu [APP/
app_controller.php, line 234]
Notice (8): Undefined property: CakeErrorController::$user_menu [APP/
app_controller.php, line 235]

Please help me with this ahh so Ican understand what is what in
here...
Thanks
chris

On Feb 8, 11:16 pm, John Andersen <j.andersen...@gmail.com> wrote:



> Take a look at the App class in the CakePHP book 
> at:http://book.cakephp.org/view/529/Using-App-import#!/view/499/The-App-...

> That may be what you wish to use.
> Enjoy,
>    John

> On 9 Feb., 07:23, "chris...@yahoo.com" <chris...@yahoo.com> wrote:

> > Hi guys,
> > I'm trying to setup existing script, actually trying to migrate
> > existing script to new version.
> > And I have in my app_controller.php

> > <?php
> > uses('L10n');
> > uses('I18n');
> >  loadModel('Menu');

> > class AppController extends Controller {

> >   static $FLASH_ALLOWED_TYPES = array('error', 'valid', 'notice');

> >   var $helpers = array('Html', 'Form', 'Time', 'Text', 'Javascript',
> > 'Ajax', 'Session', 'Application', 'User', 'PhotoShow', 'GroupShow',
> > 'GiftShow');

> >   var $components = array('Cookie', 'RequestHandler');

> > AND I CANT SEE IT IN VEIW,...
> > getting this error message

> > Fatal error: Call to undefined function loadModel() in /home/weedguy/
> > weedzag.com/html/app/app_controller.php on line 4

> > any suggestion...???

> > Thanks

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to