I am having trouble with an assertQuery(). In the html I have (verified by outputting the body)
<input type="text" name="LASTNAME" id="LASTNAME" value="" maxlength="25" size="20" />
So I wrote a query for it to test to make sure this element exists and that the value is empty
$this->assertQuery('input#LASTNAME[value=""]', 1);
…
ATM i'm manually generating a cache key based on the method name and parameters, then follow to the normal cache pattern. This is all done in the Controller and i'm calling a model class that 'extends Zend_Db_Table_Abstract'.
public function indexAction()
{
$cache = Zend_Registry::get('cache');
$individualleaguekey =…
What do you do if you need to have a script file in the head section that is only used on one page, but all the pages can use the same head otherwise?
Right now, I'm doing:
<?php include header info?>
<script></script?
<?php include rest of header info>
<body>
...
I'm trying to figure out how…
I have this form:
class Request_Form_Prova extends Zend_Form
{
public function init()
{
$this->setMethod('post');
$SubForm_Step = new Zend_Form_SubForm();
$SubForm_Step->setAttrib('class','Step');
$this->addSubform($SubForm_Step, 'Chicco');
$PrivacyCheck =…
I use a basic setup which uses a layout.phtml for the HTML Layout and view scripts for the content part.
I want to control some variables in the layout in my controllers, i.e. the title of my site.
How can I access my layout to output variables from within the controller?
Thanks for your feedback!
I am trying to store my Google Maps API Key in my application.ini file, and I would like to be able to read it from my controller whenever its needed. How can I go about reading values from the application.ini from my controller?
Thanks!
Thats basically my code (simplified):
class IndexController extends Zend_Controller_Action
{
public function indexAction(){
$this->view->setBasePath(APPLICATION_PATH . '/views/partner/xyz/');
$this->view->render('node.phtml');
}
}
Now what I (obvoiusly) want is to use the view…
Ok, this is driving me nuts!
I have a directory structure as follows:
application
- modules
-- default
--- controllers
--- models
---- DbTable
---- Cachmapper.php
--- views
My config file looks like this
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library =…
I'm trying to redirect to
http://localhost/site/public/admin/login
from
http://localhost/site/public
but for some reason, it keeps redirecting to
http://localhost/admin/login
The code I am using is:
$this->_response->setRedirect('/admin/login')->sendResponse();
This is really frustrating me,…
I have a php site optimized for iphone, its currently running inside of an iframe in a uiwebview objective c wrapper. Everything currently works except for the sessions inside of the iframe, Im assuming this is due to the cross domain issue with iframes and sessions? my solution is to save the sessions to the db.…
Is there a way to get a validator to fire even if the form element isn't required?
I have a form where I want to validate the contents of a texbox (make sure not empty) if the value of another form element, which is a couple of radio buttons, has a specific value selected. Right now I'm doing this by overriding…
Maybe the question is not self-explanatory, so I will explain it through.
The deal is: I got the variable $conn in the bootstrap class file. I'd like to make it global for every controller so that I just have to call $this-conn in the controller action scope in order to access the data inside. How would I do it?…
I have ZendServer CE (PHP 5.2) installed on a Fedora VM, and I have the system timezone set to 'America/Chicago'. I have date.timezone = 'UTC' in my php.ini file, and when I call date_default_timezone_get(), or display date('T') on a web page, it says 'CDT'.
The documentation on php.net for…
Zend_Controller_Plugin_ErrorHandler always forwards to ErrorController::errorAction() in the default module but i want it be module aware. For example when a exception throws it must be call the module's ErrorController like Admin_ErrorController:errorAction.
How can i do this?
Thanks.
How do I get the request object from inside the bootstrap file?
I can try this methods but not work.
$request= new Zend_Controller_Request_Http();
$reuqest = Zend_Controller_FrontController::getInstance()->getRequest();
Hi,
Its my 1st App using ZF. As our client requirement i have made separate admin and front panel. Without using Zend_Acl. I have problem when session expires it always takes me on front end log in page . I have tried to solve it by session but it's using single session for both admin anf…
Hi, am 100% sure I downloaded and extracted version 1.8 of ZF, but then when I go to console and typed "zf show version" it says am using 1.9.6, yes I do have 1.9.6 but it is "Compressed" and untouched, how could this be possible ?, I double checked my system variables, there's no evidence…
I want my website to do exactly what Stackoverflow does with openId.
I'm combing through sources, and I have done this before with facebook, but
not making much progress with OpenID.
What I would like to do is just detect if someone has logged into Google,
and if they have get some…