zend-framework

Zend Search Lucene floating point numbers range search

Hello, I have problem with Zend Search Lucene when searching float numbers. The problem is that when I execute query like avg:[0.15 TO 0.30] I get error message Range query boundary terms must be non-multiple word terms. For parsing the query I use the default parser. I a little desperate now because searching float numbers is main aim ...

Zend Framework - How to implement partials which contain logic

Hi I have a layout which works fine. This layout contains several partials, which display adverts, a side column a slideshow, etc. All of these are likely to change depending on which page (module/controller/action) of the site you are on. What is the best way of doing this correctly? In the past I have assigned variables to my view in...

How would I make a Zend_Form_Element_Hidden tag immutable?

I have a value that needs to be set in the form for processing, but I do not want the user to be able to edit this value. A hidden element will mostly fit my needs, but I'm concerned a clever user could enable the hidden field and change it. Is there a validator or setting on the Hidden element that would require the submitted form valu...

what is the Zend path

Where should i set the set_include_path for zend... i am trying to use google calendar on my site, and it works on zend.. i never used zend, i am new to stuff like that, so on this google calendar api page it says: Before running this sample or developing your own code which uses the Zend Framework, you may need to set the include_p...

Best way to use Zend_Oauth_Consumer without cookies and without session

I am developing gadget with tech requirements: "no Cookie, no Session". I have the following code: <?php class LinkedIn { private $options; private $consumer; private $client; private $token; public function __construct($params) { // set Zend_Oauth_Consumer options $this->options = array( 'version' => '1.0', 'localUr...

How would I format Zend_Form_Element_Radio so the label follows the input?

The default decorator for the Zend_Form_Element_Radio is <label for="type_id-1"><input type="radio" name="type_id" id="type_id-1" value="1">Pack</label> The label tag wraps the input tag. Instead I would like to to look like <input type="radio" name="type_id" id="type_id-1" value="1"><label for="type_id-1">Pack</label> I thought i...

problem with putting query into $this -> in Zend

the engine in using zend, here is my get query <input type="text" name="q" value="<?php echo $this->query->getQuery(); ?>"> and here is my title tag $this->headTitle('Homepage'); I would like to put the query keyword replacing Homepage, I have tried parsing many different codes but out of luck, anyone can help? ...

Zend Framework's "zf" CLI tool - why nothing from quickstart works?

Hello, I am going through the Zend Framework "quickstart" tutorial at the mo'. I have PHP and Zend Server Framework on my Ubuntu machine (all installed from Synaptic). The following zf usage has worked. zf create project projectToCreate But, after that, nothing works! For example: zf enable layouts (it moans "Action 'enable'...

zend framework php ErrorController: how do i throw an expection that will be shown in the Error Controller

Hello. I created an ErrorController using the zend framework tool, what I don't understand is how do i actually use it? I want instead of throwing an Exception that will shown on the screen, to throw an error that will be shown in the Error Controller. using Zend Framework v1.10.7 any ideas? thanks ...

Autoloading Symfony classes in Zend_Framework

Hello, How to autoload Symfony classes in the app based on Zend Framework? Can I push some kind of Symfony autoloader to the Zend's Autoloader? I need to use some of the components like output escaper or dependency injection classes. ...

Zend Naviation Menu View Helper - All links are the same??

heres my setup: http://www.example.com/&lt;module&gt;/&lt;controller&gt;/&lt;action&gt; I have this route defined: $router->addRoute( 'editUser', new Zend_Controller_Router_Route('admin/users/edit/:id', array( 'module' => 'admin', 'controller' => 'users', ...

How to use dependency injection in Zend Framework?

Currently I am trying to learn the Zend Framework and therefore I bought the book "Zend Framework in Action". In chapter 3, a basic model and controller is introduced along with unit tests for both of them. The basic controller looks like this: class IndexController extends Zend_Controller_Action { public function indexAction() ...

Zend_Auth_Adapter_DbTable UTF-8

Here is how I am getting an identity from a database: $adapter = new Zend_Auth_Adapter_DbTable(Zend_Registry::get('dbAdapter')); $adapter->setTableName('clients'); $adapter->setIdentityColumn('email'); $adapter->setCredentialColumn('password_hash'); // etc $client = $adapter->getResultRowObject(null, array('password_hash')); Zend_Sessi...

Zend_Navigation add class to active link

How can I add a class to the active navigation link? If a link points to URI /index/index and the request URI is also /index/index, I would like the link to have class, for example: <li class="active"> <a href="/index/index">Index</a> </li> This is how I am initializing navigation in the bootstrap: protected function _initNavigat...

unable to load the helper class inside a module in zend frame work

hi i am a newbie in zend frame work.. pls help mee i am going through a registration module. and in that module there is separate helper file called Tools for calculating age... date comparison etc while trying to create object of Users_View_Helper_Tools in indexAction getting a fattal error of Users_View_Helper_Tools not found how w...

PHP: How can we disable exception messages on production website and keep them in dev?

Hi, How can be disable exception messages on the production website and keep them in dev? Example: try{ //some code } catch(Exception $e){ echo $e.getMessage(); } Edit: How it done on Zend Framework? (.ini file but what about exception code that should be write?) Edit 2: If my example can't work how zend framework disabl...

Is UML Class Diagram of Zend_Log correct?

Background of question Analysis of Zend_Log reveals following Class Diagram Zend_Log: uses ReflectionClass & Zend_Log_Exception maintains reference to array of Zend_Log_Writer_Abstract maintains references to array of Zend_Log_Filter_Interface Zend_Log_Writer_Abstract maintains reference to array of Zend_Log_Filter_Interface main...

Using custom isValid() function for specific subform in Zend_Form

Hi, I have a form with several subforms. I've overriden the form's isValid function with my own, but can't find any documentation on how to set an isValid function per individual subform. Can someone post a link or sample code so I can learn how to do this please. Thanks in advanced. ...

ZF: Custom route, make all parts as param

Hi All, Hopefully someone can help me out here. I have a Zend Router that handles adding stuff to the basket. Now i'm building a customiser module, so the user can add as many parts, in different colors, on specified sections of the product. My basic url is like this http://www.domain.com/shop/add/custom/size/type My current router...

Get Zend Session using the session key

Hey Guys, I am developing a REST API layer for my application using Zend_Rest_Controller. I have an authenticate method where the clients will pass the apikey and after the key is authorized I have to create a session (for which I'm using new Zend_Session_Namespace(<32 bit unique session key which I'm generating>)) which need to be retr...