zend-framework

How do i pass the params to the zend_navigation which references the other page

$pages = array( array( 'label' => 'Search', 'title' => 'Please Search', 'uri' => 'Search.php', 'params' => array('stcode'=>$stcode) )); now the pages array will be passed to the zend_naviagtion $container = new Zend_Navigation($pages); $view->getHelper('navigation'...

How to set order of columns where joins are included in select in Zend Framework

Hi Do you know if in case as follows there is any way to set sequence of columns? which is first, which one is second etc? $select->from(array('e' => 'equipment'), array( 'ID_equipment', 'nr_in', 'equipment_type_ID_equipment_type', 'serial_n...

doctrine 2 Annotations and Zend Framework underscore convention

I am working through the doctrine 2 (Beta3) sandbox and trying to apply the Zend Framework coding convention of placing a leading underscore to private class members. When I query Address, while its private members are NOT underscored, i retrieve the object as expected. When I add the underscores, regenerate and repopulate the db, and th...

How do i pass the PHP Dynamic variables in to the XML File

Iam trying to generate the menu and For that iam using navigation.xml (Zend Framework) Contents of navigation.xml(file) <?xml version="1.0" encoding="UTF-8"?> <config> <nav> <page1> <pages> <label>test</label> <uri>abc.php</uri> </pages><page1></nav></config> and in the controller iam reading the config.xml file as follows $con...

Where to store user type

Hi, I'm new to Zend and not sure on how to go about this problem: After a user logs in and gets authenticated, I make a query and retrieve the user's roles. From what I understood, a Zend_Registry variable is only global if it is set inside the bootstrap. Is it possible to create a global variable inside the controller? ...

Zend Controller Question

Hi, i have created a controller in which the default index action is being used to display a login form and then authenticate the user. However i have ended up having to add functions into the controller which i feel will clutter up the controller. for example i have functions like: protected function _process($values) { ...

Why Zend_Log_Writer_Firebug can't log messages from dispatchLoopShutdown plugin?

Why logs can be sent from dispatchLoopShutdown plugin as it occurs before Zend_Controller_Response_Abstract->sendResponse() and any headers haven't been sent yet ? I init logger resource in my bootstrap protected function _initLogger() { $writer = new Zend_Log_Writer_Firebug(); $logger = new Zend_Log($writer); Zend_Reg...

ZF: Route to partner website URL

Hi, How can i setup a route that points to URL of a partner website? Example: <a href="<?php echo $this->url(array(), 'superPartnerRoute'); ?>">Try this ultra fab partner website</a> Reason for this; the URL is quite complicated and used around the website i'm working on. http://slippery.slick.domain.com/very/long/url/index.asp?vie...

Zend+Doctrine yml schema question

I managed to get my Zend modular project working with Doctrine 1.2 according to these instructions http://github.com/beberlei/zf-doctrine and I have one question: Can I somehow get rid of writing entity names with prefixes Default_Model_ and Forum_Model_? For example write this prefix only once somewhere in yml and all entities in yml...

validate int which exceeds PHP_INT_MAX value (2147483647) in zend framework

Any workaround to validate an int field which exceeds PHP_INT_MAX (2147483647 on 32 bit) value? The code I am using in Zend framework is: 'int_input' => array( 'allowEmpty' => true, 'Zend_Validate_Int', array('Zend_Validate_Between',0,4000000000), 'message' => 'Int must be between 1 and 4,000,000,000.' ...

Parsing an .htaccess File With PHP

I am using the Zend Framework, and I use the .htaccess for some settings. I am now writing command line scripts for scheduling (e.g. cron). Command line scripts don't look at the .htaccess file because they're not served up by Apache. I would like to parse the .htaccess with my script to retrieve some settings. Here are the lines I'm...

How does one query a Zend_Db_Table_Row

Is it possible to run an SQL (Zend_Db_Select) query against a Zend_Db_Table_Row object? What about joining two Zend_Db_Table_Row objects? I know it sounds a bit retarded, but I'm processing hundreds and thousands of rows. I already have the row object that I'm manipulating, so I don't want to query the db again. I hope that's clear. If...

Problem loading models with modules in Zend Framework

I have a folder structure like this and I'm trying to load the News model inside my controller: <?php /** * Login */ class Admin_NewsController extends Zend_Controller_Action { public function preDispatch() { $layout = Zend_Layout::getMvcInstance(); $layout->setLayout('admin'); } public function init() { ...

Using PDO Sqlite in-memory Db for PHPUnit tests

Hello I recently got PHPUnit working with xDebug for testing my Zend Framework applications. The fact I use ZF shouldn't make any difference to this question- just mentioned it for completeness. Anyway, it all works fine, but now I want to set up an in-memory database using PDO SQLite. I have done this successfully and have created tab...

How can I use multiple views in a Zend_Application (using Zend_Layout)?

I have a layout with 4 separate "chunks". They are: A nav panel with a menu and breadcrumbs. This is constructed using Zend_Navigation. A sidebar, which shows general "news" by default A content area, where the main output from each controller action would be placed A header area, which is the above the navigation, which normally disp...

Why am I getting Application error while trying to load a model?

I've run this code Zend_Loader::loadClass("Admin_Models_DbTable_News"); and my application has this folder structure Why do I get this: An error occurred Application error ...

xampp zend framework and zendserver ce one don't get along well in command line

Hello Gurus! i've been using xampp 1.7.3 for a while now and today i've decided to have a look into zend framework and got a zendserver ce 5.0.2. i'm on windows 7 and until i used the command line tool, i haven't noticed that there was a version of zend framework (zf) shipped with xampp. zendserver got a more recent version than the...

ZendAMF returning invalid XML and causing BadVersion error when called method from Flash

I am trying to use ZendAMF to do remote method calls to a MySQL database from Flash and I keep recieving the NetConnection.Call.BadVersion error. My Server is working correctly. Apache 2.2.14 My PHP is working correctly. PHP 5.2.11 My Database is working. MySQL 5.0 UPDATE: My first problem was a security error in Flash. If you try to...

Problem with Zend_Db_Abstract in Model

I've found out that when I extends Zend_Db_Table_Abstract in my model I get An Error Ocurred Aplication error When I run this code <?php class Admin_Model_News { protected $_name = 'news'; protected $_primary = 'new_id'; public function addNews($data) { $this->insert($data); } } It works properly, but when...

zend framework how to avoid baseurl getting prepend to the link.

Greetings, links redirecting to other website not working.... Am trying to display member's website as a link, which is retrieved from database, as link, when clicked should redirect or go to that website. But members website url is getting appended to the end of the site base url as shown below . [a] href="www.mysite.com/member/deta...