zend-framework

Zend_Db_Table fetchAll and column names

I'm testing Zen_DB and Zend_DB_Table and I'm facing a problem: Let's say I've got two tables table A(id, title) table B(id, title) If I write something like $db = $this->getDbTable()->getAdapter(); $query = "SELECT A.*, B.* FROM A INNER JOIN B on A.id = B.id" $stmt = $db->query($query); $rows = $stmt->fetchAll(); each re...

Zend Framework Project Location

Dear, I am new to Zend studio (using ver. 7.1.0) + server + Framework(Framework setup manually by using Zend Server library and bin folders. My OS is Vista - business ). I created the zend framework web project using studio. But there is not the files under the htdocs. I check the path several times, but fault is remain. And I copy to e...

Configuring a PHP framework at server side

Does using a PHP framework (CodeIgniter, Zend) require special server side setup? And if yes, is there a PHP framework which doesn't require that? The intention would be to use a hosting server which supports plain PHP only (no framework installed - if that makes sense), and use the mentioned framework on the development machine only, w...

how to unit test Zend_Soap_Server?

I have a controller that dispatches Zend_Soap_Server and I want to create a unit test for it. How can I do it? Should I use Zend_Soap_Client? Please, give me some hint. ps. I don't use WSDL ...

How to edit my SVN account in Zend Studio

I am working on Zend Studio and using Subversion. Since yesterday, my account is no longer accepted; I get errors like: "the account is not matching"... Can someone tell me how we edit a svn account in Zend Studio? The colleague who installed svn is missing! pas de chance ...

Zend Framework and keeping all of my code together

I've added the following to my application.ini: [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.controllerDirectory = APPLICATIO...

Zend Framework and LoginController with LoginForm

I've got some stuff I'm trying to do with ZF; I have a LoginController.php in application/controllers/ with class LoginController extends Zend_Controller_Action. Within it, I have the following: public function getForm() { return new LoginForm(array( 'action' => '/login/process', 'method' => 'post', ...

zend models architecture

Let's say I have two tables in a database: projects and users. I create two models, that extend Zend_Db_Table_Abstract: Model_DbTable_Users and Model_DbTable_Projects. Now, is it a good pattern to create an instance of Model_DbTable_Projects inside the Model_DbTable_Users class ? In other words: is it OK to put any logic in this model, ...

Zend Framework with Kohana PHP 3

I've put the Zend library folder into classes folder of my app and renamed all files and folders to lowercase ( using Ant Renamer ). When I call Zend_Feed, instead of loading /classes/zend/feed.php, kohana loads Zend from my servers share\ZendFramework\library\Zend\ (Zend Server), so I get a Cannot redeclare class Zend_Uri_Http error. ...

Zend Framework Error handling

Hi I would like to use the default ErrorCongtroller to handle error. I registered it as a front controller plugin and it does nothing. Should I set something else to catch not existing controllers and actions or should I add some code to other controllers? Here's the code snippet for registration: $front = Zend_Controller_Front::getIns...

How can I dynamically add a Zend_Dojo form element to a zend_form?

Currently I can add a Zend Form element dynamically to a form after it is first loaded. I do this through a mouse click and some ajax. However, I want to add the exact same element with a different name (basically I am giving each element an id). However, when I add the field it just shows up like a normal field and isn't Dojo'fied. ...

jQuery was auto loaded in my Zend Framework application

Dear all I have a Zend Framework application. It works normal and load Jquery from my local folder. But after try this tutorial (but removed the Jquery call as in the tut) and revised some JS call (load some JS file from layout instead of view), it work abnomally: automatically load Jquery from Google CDN: <script src="http://ajax.goog...

PHP with Zend Framework can't start a SQLite database?

Trying to get a simple PHP/Zend Framework setup to create a SQLite databse and manipulate it. <?php require_once("Zend/Db.php"); // Zend framework $db = Zend_Db::factory('Pdo_Sqlite', array("dbname" => "./test.sqlite3")); $sql = "CREATE TABLE IF NOT EXISTS ".$db->quoteIdentifier("configs")." (".$db->quoteIdentifier("name")." TEXT NOT ...

PHP JQGrid Zend Framework

I am trying to JQGrid in Zend Framework , but not working. I am getting the Json formated string as output Controller: <?php // require_once 'Zend/Controller/Action.php'; class TestController extends BaseController { public function indexAction() { // TODO Auto-generated TestController::indexAction() default action ...

How to create a many-to-many relationship within a model in Magento?

I'm looking to add a new first class object to Magento - in this case a Video class. I'd like the video class to have many-to-many relationships with products and categories. These relationships would identify which pages that video shows up on, and should be accessible from both sides of the relationship. It's pretty clear how to ad...

Zend Framework: Zend_DB Error

Hi, I'm trying to learn ZF, but got strange error after 20 minutes :) Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'Configuration array must have a key for 'dbname' that names the database instance' What does this error mean? I got DB information in my config file: resources.db.adapter=pdo_mysql resources...

accepting user uploads best practices!

Hi, Im trying to add a multi page form, in php with zend framework, where users can list an item to my site. On the first page they enter details about the item(which is then stored in session), page two they can upload images, and then page three they can confirm the listing. If they confirm then the listing is added. What is the best...

zend framework - is it possible to make a 'redirect' script in the library

Is it possible? How? Let's say I have the ff: class My_Redirect { function test() { // some testing // another testing // redirect script } } Thanks in advance! ...

Zend Framework: Creating Array Form Element & Validation

This is the data being posted to my Zend Form for validation: Array ( [cross_promotion_insert_categories] => Array ( [37908] => Antiques > Antiquities > The Americas [162922] => Antiques > Antiquities > Byzantine [162923] => Antiques > Antiquities > Celtic ) Is it possible to create a form elemen...

Uncaught exception 'Zend_Controller_Dispatcher_Exception'

Hi I am getting the following error on running zendframework . Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in F:\wamp\www\helloworld\library\Zend\Controller\Dispatcher\Standard.php:245 Stack trace: #0 F:\wamp\www\helloworld\library\Zend\Controller\Front.php(...