zend

Is this a good way to structure model on an MVC application?

Hi, This is more a "Am i doing it right?" question. I am using a MVC framework ( Zend Framework ) and was wondering if this is the best way to structure a model. In this case i have an user groups model and, after coding for sometime, i realized that on my controllers i was repeating some stuff like a query to return visible groups. ...

Zend Date giving me zeroes, why?

More problems with dates. Basically I'm trying to populate a table with some datetime values from Zend. The datatype of the column that I'm trying to populate is 'datetime'. However, no matter which constant I try the column is always populated with zeroes. I've tried Zend_Date::ISO_8601, Zend_Date::DATETIME, Zend_Date::now() to no avai...

Implementation of Uploadify with Zend

Okay, I have read, and tried a lot of things on how to implement uploadify with Zend, and I'm probably overlooking something, but I'm completely stuck. It seems my action isn't called. All the uploadify are placed in one directory inside the public folder. The upload button is called in a fancybox instance and is loaded from a hidden ...

Zend Framework: How to inject a controller property from a Zend_Controller_Plugin

I wrote a plugin that needs to set a property on the controller that's currently being dispatched. For example, if my plugin is: class Application_Plugin_Foo extends Zend_Controller_Plugin_Abstract { public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { // Get an instance of the current control...

Zend Soap Client error: Failed to enable crypto

Hey guys, I'm using the Zend Soap Client library to consume a webservice, like this: $wsdl = "path_to_wsdl_file"; $client = new Zend_Soap_Client($wsdl); $client->nfeRecepcaoLote(); And I'm receiving the following errors: Warning (2): SoapClient::__doRequest() [soapclient.--dorequest]: Failed to enable crypto [CORE/vendors/plugins/nf...

Model Helper Zend

from what i know there is only action helper & view helper available at zend framework. is there any model helper? or how we can implement the model helper? ...

ul li list with unique id in Zend_Form using decorators

hi everyone, I need to make the following html using Zend form and form decorators... <ul> <li id="containeruser1"> <label for="user1"><input type="checkbox" class="textbox" value="1" id="user1" name="users[]">User One</label> </li> <li id="containeruser2"> <label for="user2"><i...

url routing in zend framework

Hi I created several module for my own CMS like category, article, core , ... now how can I access these modules with url like: http://localhost/mycms/admin/category http://localhost/mycms/admin/article , ... note: the admin is not module, it's only prefix ...

How to set controller/action to Page Not Found

I have a controller and action which I'm accessing through a custom URL. The original route is still accessible though at the default location zend.com/controller/action How can I change this to simulate a "Page not found" when the user tries to access this URL? Is it possible? ...

Storing static text for Zend Framework frontpage

I'm working on a small website and need to display blocks of static text on the front page. These blocks will be styled later as paragraphs or bullets and so on. Where do you suggest I store this text? Do they go as variable in each view where they are used? I could do that, but I'd prefer to have a central location for all this text. ...

Pass variable into Zend Form

Hi I have a zend form instantiated $form = Form_Example(); Now I want to pass an ID from my controller to my form. So I did this: $form = Form_Example(array('id' => $id)); Inside the form I try to call it through: $this->id But it isn't there. Anybody knows how to get that id into the form? Thanks ...

Symfony with Zend Lucene and related models (with foreign keys)

Well I was developing an application usin Symfony 1.4 and Doctrine when I realized a major drawback on my Zend Lucene implementation. I have a model called Publication that is related (via foreign key relations) with a few other models (subjects, genres, languages, authors, etc.) and I'm getting they're names when adding a new document ...

Zend Framework - storing and retrieving cookies

I try to put the user's email in a cookie when he logs in, and retrieve it at his next visit. The code below doesn't work, obviously I am missing something. When user submits login info, store the email in cookie: $cookie = new Zend_Http_Cookie('emailLogin', urlencode($email), 'localhost'); At the next user's visit, retrieve the user'...

Is there a way to use google analytics to track calls to a json response?

I am working on a app that uses a json response from my Zend Framework 1.10 website. I want to track how many times the Json Action is hit? If there is no true way to do this from just the action that is not reflected the json response. ...

Where create cookie that holds only user id in Zend MVC project?

Hi, I am working with Zend MVC project. MY mission: add cookie that will have only user unique id. Problem:I don't know where create a cookie. Options to place create a cookie, that I thing about: bootstrap.php init()/run() index.php (not make sense) In Controllers My project structure: application/bootstrap.php public/index.ph...

php setcookie vs Zend_Http_Cookie

Hi, Why this code not working, and how can I make it works like setcookie('cookie_name','cookie_value'); The code that not create cookie: $cookie=new Zend_Http_Cookie('cookie_name','cookie_value','.google.com'); Or what difference between: setcookie('cookie_name','cookie_value'); vs $cookie=new Zend_Http_Cookie('cookie_name','...

Applying Class to Customer Zend Decorator

I found code that would change the standard dt and dd tags to table tags for a Zend_Form_Element. Here is the code I used: $element->setDecorators(array( 'ViewHelper', 'Errors', array(array('data' => 'HtmlTag'), array('tag' => 'td', 'class' => 'element')), array('Label', array('tag' => 'td', 'class' => 'rightAlign')),...

Zend Framework: How to add a custom validation rule in Zend Form?

Hi I have a created a zend form, works fine along with validations. Is there anyway I can add a custom validation within this form for the email address, for example I want to set a validation to check if the email address supplied by the user is hotmail, as I want to accept only hotmail email addresses. <?php class Application_Form_R...

ExtJS and Zend Framework MVC

Im making a Zend Framework MVC application using the standard Zend MVC structure and I wanted to know where I should be putting my client-side ExtJS javascript, not the library but my js files. ...

Javascript or PHP or Zend Framework - how to check previous url?

Note: For marketting analyze, this url is in many other websites (ex: http://mysite.com/marketting ). So user clicks it and comes to my site. Problem: But how can i check from where he came from? Did he came from facebook/ or google.com/ stackoverflow.com or wordpress.com or etc.com How can you find, which link he clicked and reached t...