Hi all,
I have troubles using Zend Framework's PDF
When I create PDF file I need to use UTF-8 as encoding.
This is the code I am using to generate simple pdf file.
I always get this wrong displayed.
Instead of seeing 'Faktúra' in pdf file, it gives me 'Faktú'
Instead of seeing 'Dodávateľ:' in pdf file, it gives me 'Dodáva'
$pdf = new...
I'm relatively new to Object Oriented Programming. I pretty much understand the concepts, but practically speaking, I am having a really hard time finding information about how to best use Models in my Zend Framework applications.
Specifically, I have a Model (that doesn't extend anything) that doesn't use a Database Table. It uses gett...
I am trying to implement a Flash uploader in my Zend framework application but I am having problems with the session.
The Flash does not send any cookie headers and this is why the session is lost. I am trying to send the sessionId as a post param and in my bootstrap file I added a session_id($_POST['session_id]) but this doenst seem to...
Can you recommend good data grid component for Zend Framework?
...
We have an application developed using Zend Framework preview version 0.7. Now I would like to write unit test its controllers / logic files.
The logic mostly deals with the database and for database I am using my own wrapper.
Did anybody try unit testing an application on top of Zend Framework version 0.7 ?
...
I'm just getting into Dojo and wanted to try a simple AJAX Post like the examples on
Dojo's website.
Here is the HTML/JS:
<form method="POST" id="addProjectForm">
<dl>
<dt>Project Name:</dt>
<dd><input dojoType="dijit.form.TextBox" id="projectName"></dd>
<dt>Project Description:</dt>
<dd><textarea dojoType="dijit.form.Textarea" ...
I am looking for a reliable way to check to see if a directory contains a Zend_Search_Lucene index. Currently, the only way I have managed to work this out is to check the contents of an exception returned to me using the following code:
<?php
try
{
$newIndex = Zend_Search_Lucene::open( $luceneDir );
} catch ( Zend_Search_Lucene_Exc...
I am testing my Zend Framework application and would like to test that something happens when a particular key is not set in the registry. This is the function that I am testing:
protected function getDomainFromConfig() {
$config = Zend_Registry::get('config');
if (!isset($config->domain)) {
throw new Exception('Please m...
I'm using several response segments which I push on my action stack like this:
$userlogAction = clone($request);
$userlogAction->setActionName('userlog')->setControllerName('index');
$actionStack->pushStack($userlogAction);
Now when I test for the current action in my view:
$request = Zend_Controller_Front::getInstance()->getRequest(...
I'm trying to build a form using the Zend_Form component, but the number of elements varies. The information for each Zend_Form element is stored in a database (name, options, validators, filters, etc.).
The application I'm working on consists of building surveys which contain a varying number of questions. Each question is associated w...
Hi,
I'm working on a Zend Framework (v1.7) application that calls for a few forms that users need to enter dates on.
The user is prompted to enter dates in the dd/mm/yyyy format, but the MySQL database wants the dates to be presented in yyyy-mm-dd format. Therefore, i'm having to do the following:
Loading the form
Grab the data fr...
I am experiencing strange behavior with my Zend Framework application.
I run this url, hoping to get index controller run the 1234567890 action.
http://hello.com/index/1234567890?test=http%3A%2F%2Fworld.com%2Findex.php
I however get exception like this:
Message: Invalid controller specified (4567890)
And strangely all URLs that ar...
I have recently started using Zend Studio which has reported as warning the following type of code:
$q = query("select * from some_table where some_condition");
while ($f = fetch($q)) {
// some inner workings
}
To stop the warning the code needs to be written like this:
$q = query("select * from some_table where some_condition");
$...
I'm trying to use Zend Framework with SQL server 2005 express (through Pdo_Mssql with wamp installation) but seem that pdo can't connect to SQL.
This is my code:
require '../application/bootstrap.php';
try {
$db = Zend_Db::factory('Pdo_Mssql', array(
'host' => 'localhost',
'username' => 'sa',
'password' => 'veryst...
Case: you're developing a site with Zend Framework and need relative links to the folder the webapp is deployed in. I.e. mysite.com/folder online and localhost:8080 under development.
The following works nice in controllers regardless of deployed location:
$this->_helper->redirector->gotoSimple($action, $controller, $module, $params)...
Hi,
I'm developing a mobile site using Zend framework, and the site has two possible output formats (WML and XHTML).
I'm using the same models and controllers, and then just setting which view to render with in the controller. At the moment, this is decided on by the HTTP Accept header.
This needs to be definable in the URL as well.
The...
I'm toying with Zend Framework and trying to use the "QuickStart" guide against a website I'm making just to see how the process would work. Forgive me if this answer is obvious, hopefully someone experienced can shed some light on this.
I have three database tables:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`ema...
I realize that I should be able to do this, but what can I say, I don't get it. I've even rtfm'ed until my eyes fried. I learn best by examples, not the deep explanations that Zend's docs give, or the typical "use decorators" response that this type of questions usually produce. What I need is markup like this:
<dt>
<label for="nam...
I'm currently styling form elements with a custom CSS class to style text inputs differently, as in:
$submit = new Zend_Form_Element_Submit('login');
$submit->setLabel('Log in')
->setAttrib('class', 'submit');
And
$username = new Zend_Form_Element_Text('username');
$username->setLabel('Username')
->setAttrib('class', 'textinp...
Hey guys,
I want to use the HTMLpurifier in combination with the Zend Framework. I would love to load the Class and its files with the Zend_Loader. How would you include it? Would you just use the HTMLPurifier.auto.php or do you know a better way of doing it?
...