Page 1 of 1

regular php in Zend Framework

Posted: Wed Nov 17, 2010 8:53 am
by Wikke
I'm new to Zendframework but i've heared that its possible to use normal php within Zend FW.

now i have a class Users.php with some SQL (create, update,.. ) and i want to use this in a controller.
I also have a class that connects to the database from which te users extends.

all this works outside Zend but when a include one of the classes in my controller it doesn't work.

How can i do this.

I don't want to extend my classes from Zend_Db_Table_Abstract

Re: regular php in Zend Framework

Posted: Wed Nov 17, 2010 9:58 am
by josh
Zend framework is written in PHP, of course your PHP code will work with it. If you have a problem and describe it here I'm sure someone can help

Re: regular php in Zend Framework

Posted: Wed Nov 17, 2010 11:09 am
by Wikke
found the error.

forgot '../' in my require

Re: regular php in Zend Framework

Posted: Wed Nov 17, 2010 8:16 pm
by Luke
As josh said, there is nothing special about Zend Framework. It is PHP just like any PHP you might write. It is not a magical black box. :)

Re: regular php in Zend Framework

Posted: Thu Nov 18, 2010 3:26 am
by matthijs
It isn't. But sometimes it can seem to be :)

Re: regular php in Zend Framework

Posted: Sat Oct 25, 2014 4:44 am
by dhoom
With Zend you just set Zend_Loader to be the autoloader. You add prefixes and paths. So you say look in /lib/Doc/ for classes beginning with Doc_ and it will.