zend-framework

Adding items to a Zend_Paginator already created?

Hello, in my controller I have created a paginator instance like this: // On crée un objet paginator pour afficher un tableau de résultat. $paginator = Zend_Paginator::factory($versions->getVersions($projectId)); $paginator->setCurrentPageNumber($this->_getParam('page')); $paginator->setItemCountPerPage(15); Then I iterate over in my ...

How to get odd numbers of parameters in Zend Framework?

Greetings everyone Using the request object, I can't get a sole value as in this URI: http://mydomain.com/controller/action/value1 Using $request->getParams() is not returning the value1. Output: array([controller] => 'controller', [action] => 'action') The key is missing. The issue itself is quite simple and I could parse the U...

Zend_Db_Select - Joins and Count - Possible Zend Bug?

I'm having an issue getting a COUNT() from a SQL query using Zend_Db_Table_Select, and I think it may be a possible bug because the SQL it should be generating actually works. Here's the Zend Select Query: ($this is a Zend_Db_Table, renamed to table1 in this example) $select = $this->select(); $select->setIntegrityCheck(false);...

how to use of select with multi condition in zend framework ?

hi all i want to select rows with multi condition in zend framework how can i implement that/ 1-example "select id,firstname,lastname,city from person where firstname=alex and city=xx "; 2-example "select id,firstname,lastname,city from person where firstname=alex or city=xx "; ...

Zend Debugger Terminates After Index Page

I have a website running using Zend Framework and am trying to setup Zend Debugger. Zend Debugger is installed and it works correctly with the tutorial PHP pages however when I try debugging with my app, it will work for the index page but then the debugger will terminate. I am running Apache2.2 with PHP 5.3. I have a virtual host set...

Something wrong with values in submit buttons

$button = new Zend_Form_Element_Submit('melnraksts'); $button->setAttrib('id','melnraksts'); $button->setValue(Lang::$form[17]); $button->setDecorators(array('Composite')); $button->removeDecorator('Errors'); $form->addElement($button); $submit = new Zend_Form_Element_Submit('submit'); $submit->setA...

How to add CSS classes to Zend_Form_Element_Select option

Hi, I'm trying to add a CSS class to a Zend_Form_Element_Select option, but I just can't find a way to do it. The desired output would be something like this: <select name="hey" id="hey"> <option value="value1" style="parent">label1</option> <option value="value2" style="sibling">sublabel1</option> <option value="value3" s...

Zend_db junction table join query

Hi guys, Not sure why I can't figure this one out. Basically, I have two tables with a many-to-many relationship so I have a junction table inbetween them. For an example, consider the following database schema: Restaurant (id, restaurant_name, suburb) RestaurantCuisine (restaurant_id, cuisine_id) Cuisine (id, cuisine_name) So, ma...

jQuery integration problem in Zend Studio/Framework

Hi everybody, I'm struggling to build a simple zend framework application that can call jQuery. So, what I'm working under Zend Studio 7.1.1 where I added, in the library folder, the "ZendX" folder. And, I also downloaded the jQuery lightness theme that was added to the "js" public folder. You'll find the whole structure is like that: ...

Problem with addDisplayGroup in the Zend Form

Hi all, I have a form same the following code: public function init(){ $id=$this->createElement('hidden','cf_id'); $id->setDecorators($this->elementDecorators); $id->setOrder(1); $this->addElement($id); $firstName=$this->createElement('text','firstName'); $firstName->setDecorators($this->elementDecorators); $firstName-...

PHP session starter detect for visitor counting

Is there a way to find out on session being started. Like for instance the session start event in the global.ascx file of .net. The requirement is to find the no. of visits the user has done on the site. Instead of checking each time during posts or gets to the server. Is there something in php to find out if the session is a new one. ...

Zend_Db_Table_Abstract and MySQL COMMENTs

I have built a query tool that enables a non-technical user to query parts of a database. I want to rename all the columns nicely. e.g.: table_id` > "Table ID" forename > "Forename" phone > "Telephone" I have put all the information into the MySQL COMMENT field as in: ALTER TABLE `table` CHANGE `field` `field` INT( 11 ) NOT NULL COM...

How to disable individual options in a Zend_Form_Element_Radio

Is it possible to disable individual options in a Zend_Form_Element_Radio? That is, I'd like to add disabled="disabled" to certain input tags. Does the Zend Framework include this functionality? Or is there another way to accomplish this? ...

Magento: customize Low stock report

Hey folks, I need to add a few, sales-related columns to the Low stock report (e.g. Sales last week, Sales week before last week etc.) How should I do this? I’ve already managed to add some basic columns which already exists in the Collection (e.g. price, status etc.) I’m looking at Mage\Adminhtml\Block\Report\Product\Lowstock\Grid.p...

Good Overview, Introduction and Education of the Zend Framework?

Where is a good starting point for learning the Zend Framework? The introduction from framework.zend.com left me wanting more, and really wasn't enough for me. ...

Zend_Controller_Router: Get language from translated segment

I want to use a URL rewrite on my site: /:@controller/:@action/ So I want to use translated segments on route and I want to detect requested language from these translated segments. For example, if user request a url like this: /user/profile/ then I could understand that requested language is English. And if user request a url like...

Netbeans 6.8 xdebug gives error “Can not debug missing index file index.php” in Zend Framework project

My Xdebug is properly configured as I could see in phpinfo(). But when I debug a project a Netbeans6.8, I get “Can not debug missing index file index.php” warning. Then another bigger settings window opens up as in this image. And, yes, index.php file is there. It's not missing. How can I fix it? Apache web_root: e:\htdocs Project hom...

Zend_Cache vs cronjob

I am working on my bachelor's project and I'm trying to figure out a simple dilemma. It's a website of a football club. There is some information that will be fetched from the website of national football association (basically league table and matches history). I'm trying to decide the best way to store this fetched data. I'm thinking ...

Zend Auth and Redirecting a user after login

Hi, So i'm using a simple Zend_Auth mechanism to ensure my users login before they can access certain controllers. My AdminController contains this method function preDispatch() { $auth = Zend_Auth::getInstance(); if (!$auth->hasIdentity()) { $this->_redirect('auth/login'); } } The user gets redirected to the Auth...

Lots of DESCRIBE queries in Zend Framework

I just set up FirePHP in Zend and I'm noticing a huge number of DESCRIBE queries. Some pages have 50 or more identical queries all on the same table. e.g. 0.00198 connect NULL 0.00449 DESCRIBE `nodes` NULL 0.00041 SELECT `nodes`.* FROM `nodes` WHERE (((`nodes`.`id` = 111))) NULL 0.0037 DESCRIBE `nodes` NULL 0.00155 SE...