zend-framework

How to insert array to mysql one word one row?

Hello all I am using Zend Framework. I would like to insert array $color = array('red', 'blue', 'green', 'yellow'); into mysql, one color to one row. How do I code this in my model file? Controller public function addAction() { $this->view->Title = "Add Colors"; $this->view->headTitle($this->view->title, 'PREPEND'); $form...

Zend_Tool CLI issues, throwing fatal errors

Before installing PHPUnit on my Ubuntu machine, I thought I had zf.sh all set up correctly. I was able to create a new project without any issues. Now, since installing PHPUnit, everything is not working right. When I try to create a test project, I get this: Fatal error: Cannot redeclare class PHPUnit_Framework_TestSuite_DataProvider ...

ZF Route how to avoid overide ?

Hi, I have, I believe, a simple problem, but I don't know how to solve it... So, I have the standard app with default and admin module. And I need some SEO friendly urls. In admin module I want to use standard urls like /admin/controller/action but I am killing this when I add the following code in my bootstrap file... $model_inf...

Zend Framwork - Route module on subdomain

I'm having trouble getting the Zend_Controller_Router_Route_Hostname to work properly. I'm using Zend Framework 1.9.4 In my config I have: resources.router.routes.www.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.www.route = ":module.domain" resources.router.routes.www.defaults.module = "frontend" resources.r...

Is it really worth to change from CodeIgniter to Zend Framework? if so, how difficult would it be?

Hi friends, I don't know if this is a good place for such a question. If not, sorry for messing :/ I have been using Codeigniter for a while, I have already built my own cms (to use for all my projects) and many modules (news, image uploads, etc.) and I can do my work well and quick... but I always wanted Zend Framework actually. The re...

How to verify a mail has been sent when using Zend_Mail?

I am using the Zend framework to send mail. Once the config is done and the code written it all boils down to one call: $Mail->send($Transport) How can i check that this mail has been sent correctly? I read somewhere that Zend Mail throws an exception but other people have said this is sometimes not the case. What's the bulletproof p...

Zend Forms Module Include Paths

I'm using Zend 1.8.4 and setting up a simple form test. My form class is located in './application/forms/SectorSearch.php' and the class name is <?php class Form_SectorSearch extends Zend_Form {...} My controller creates a new form in the init() method <?php class SectorController extends Zend_Controller_Action { function init() ...

Does Zend Lucene support MultiValued Fields?

I wanted to know if Zend Lucene supports multivalued fields. I tried passing a an array to a field and it doesnt give any errors during indexing. But its not returning any results when i search. Any help is appreciated. ...

Exclude elements while validating a Zend Form

I have a Zend Form with a subform which only is shown when the user selects a specific checkbox. Some of the fields in the subform are required IF the checkbox is selected, otherwise, the fields in that subform should be ignored by IsValid. What would be the way to go here? ...

Use of any class / namespace with ZendFramwork

EDIT: Additional questions: do I have to add the '.php' at the end of new NAMSPACE_CLASSNAME Can I access any Zend package inside my controller / model, for example: /* Controller // Methods // inside a */ method $client = new Zend_Http_Client('http://example.org', array( 'maxredirect...

Zend_Tool: Fatal error: Cannot redeclare class Zend_Loader

I am able to create new projects with... zf create project ProjectName ...but this creates a project without copying the Zend Framework library. So I copy ZF into my project library and try to create a controller... zf create controller auth ...and I get this message: Fatal error: Cannot redeclare class Zend_Loader in /home/andrew...

using LIKE with ZEND_DB

I want to use a query which uses LIKE .. for e.g select * from xxxx where zzzz LIKE 'a%'; How can I do that using Zend DB? I have already tried something like $db->query('SELECT * FROM XXXX where zzzzz LIKE ?','\'' . $query .'%\''); but it is not working. Thanks ...

Zend Framework rememberMe() doesnt seem to remember me

My session seems to only be valid in the current window/tab. Also it seems to timeout quickly. Heres how I'm currently attempting to do it: This is in my login controller: $adapter = $this->getAuthAdapter($data); $auth = Zend_Auth::getInstance(); $result = $auth->authenticate($adapter); if (!$result->isValid()) { $this->view->...

porting template to zend framework

Hi, I got few issues proting a pear based form to zend form. I have few elements I need : Basic Elements Groups Group Elements Sections I previously used templates to render the forms on Pear. I obviously cannot use pre-existing zend decorators, since I need to specify css classes for each of the components of my base elements. To ...

Why is the analyzer defined globally in Zend.Search.Lucene?

I just noticed that the Zend lucene implementation has a default analyzer that can be modified using Zend_Search_Lucene_Analysis_Analyzer::setDefault(), but I couldn't find a way to override that default when performing a query. Do I really need to reset the default analyzer if I'm working on multiple indexes or am I missing a function? ...

dojo file upload using zend framework problem

Hi, I am struggling with a bit of dojo that is needed to upload a file. Now the file upload form sits within a dojo dialog box, so is hidden until the user selects an 'upload file' button. This button can be clicked on anywhere on the site, so I've created a controller to handle the upload. At the moment I am just trying to get it to...

How much "unlearning" when I move to a PHP framework

I'm aware of the benefits of using a PHP framework (not first hand though, just by reading SO, etc.) But what I don't hear about is the amount of "unlearning" a framework requires. When using a framework, you hand control to the new framework and you have to "unlearn" many things and re-learn them the new way as your new framework requir...

Zend Framework ErrorController not working on live site?

My site is set up pretty much as per the Zend Quickstart guide. The default ErrorController works locally using MAMP. But now I've deployed it to my live site I get a blank page and a "500 Internal Server Error" according to FireBug when I go to an action that doesnt exist. On my local server I get a 404 and a nicely formatted error pa...

Save to session - Does a cache mean the back end code doesn't always run?

Hello SO, So for a bit of background, I am creating a website with the Zend Framework. There is a page where I am using AJAX to save a rating to my database. I obvious need the key for the store in order to know what store the rating is to be saved for. In order to access the store for the page, the URL is MYSTORE.com/stores/2. The ...

Zend Db Update Not working

My table structure is: TABLE `licenses` ( `id` int(11) NOT NULL auto_increment, `code` varchar(30) collate utf8_unicode_ci NOT NULL, `title` varchar(255) collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `license_type` char(1) collate utf8_unicode_ci NOT NULL default 'b', PRIMARY KEY (`id`) ) ENGINE...