regular php in Zend Framework

Discussion for various published PHP frameworks, including Zend Framework, CodeIgniter, Kohana, CakePHP, Yii, Symfony, and others.

Moderator: General Moderators

Post Reply
Wikke
Forum Newbie
Posts: 4
Joined: Thu Sep 16, 2010 5:17 am

regular php in Zend Framework

Post 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
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: regular php in Zend Framework

Post 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
Wikke
Forum Newbie
Posts: 4
Joined: Thu Sep 16, 2010 5:17 am

Re: regular php in Zend Framework

Post by Wikke »

found the error.

forgot '../' in my require
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Re: regular php in Zend Framework

Post 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. :)
matthijs
DevNet Master
Posts: 3360
Joined: Thu Oct 06, 2005 3:57 pm

Re: regular php in Zend Framework

Post by matthijs »

It isn't. But sometimes it can seem to be :)
dhoom
Forum Newbie
Posts: 1
Joined: Sat Oct 25, 2014 4:41 am

Re: regular php in Zend Framework

Post 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.
Post Reply