Hi,
I'm trying to send a file via Zend Framework's (1.10.7) Mail library.
$mail = new Zend_Mail();
$mail->setSubject('Test');
$mail->setFrom('[email protected]');
$mail->setBodyText ( "" );
$at = $mail->createAttachment($txtFile->toString(),
'text/plain',
Zend_Mime::DISPOSIT...
I have the next code:
$currFile = new Zend_File_Transfer_Adapter_Http();
$currFile->addValidator('Extension', false, 'jpg');
It works pretty. But if I put array('jpg','png') instead of 'jpg', only files with jpg extendion works.
How can I set more than 1 extension. Thank you for your help.
...
I just started learning Zend. I managed to get the basic working (using zf create project) in my local web server. Let's just say my project is called square
The only .htaccess that I have: square/public/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILE...
When using the normal architecture (I guess it's called controller-based architecture), zend recommends the following folder structure (taken from here):
<project name>/
application/
configs/
application.ini
controllers/
helpers/
forms/
layouts/
fi...
am generating pdf using Zend_pdf
its saving after creating
I want to open it instead of saving.
When i access the url directly
...
What does this line in .htaccess do, and when would I need it?
RewriteRule !.(js|css|ico|gif|jpg|png)$ index.php
I'm working with zend and I noticed the .htaccess generated by zend doesn't have this rule, but I've seen a tutorial that has it without explaining why.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond ...
I'm trying out the module-based architecture for my application, where the default module is what used to be the main application before.
modules/
default/
firstmodule
secondmodule
thirdmodule
Each module has its models, views, controllers. This is the default module as an example.
default/
models
...
Once you download the zend framework, you get a list of folders in Framework-1.10.8/Zend
Acl
Amf
Application
Auth
Barcode
...
Are these considered plugins, or are they modules, or are they just assisting libraries?
...
I'm following a tutorial which I think is written by someone who doesn't know what he's doing (already caught 2 obvious mistakes and the rest of code is messy). But I don't want to discredit the guy completely, so I'm asking here about something else that I don't understand.
First of all, I will send a 100 brownie points,
my 2 pets...
I am building a RESTful API services with ZF 1.10.8 as am newbie its a little bit confusing when dealing with ZF routing.
I need to have versioning, api_key, and response format in url, something like:
/:version/:response_format/:api_key/:controller ...
/1.0/json/1234567890/articles/
The version is module based with the latest versio...
I am using Zend_Session_SaveHandler_DbTable to store my sessions in the database. I have the following in my application.ini
resources.session.save_path = APPLICATION_PATH "/../data/sessions"
resources.session.use_only_cookies = true
resources.session.remember_me_seconds = 864000
resources.session.saveHandler.class = "Zend_Session_SaveH...
When generating a hash for a form token, I've seen a few different versions:
$hash = new Zend_Form_Element_Hash('hihacker', array('salt' => 'exitsalt'));
and
$hash = new Zend_Form_Element_Hash('hash', 'no_csrf_foo', array('salt' => 'unique'));
First of all, does the salt have to be unique for each form render? The second one sugge...
I want to add custom view helper in zend framework like this:
I placed in application.ini this code:
includePaths.library = APPLICATION_PATH "/../library"
and create library directory in myproject root
create view helper TabEntry.php in library directory
class Zend_View_Helper_TabEntry extends Zend_View_Helper_Ab...
I am developing an e-commerce website where we need to have 2 store views. One for the professional customer and another for the retail customer.
We need to have the same inventory but different product description, different attributes, and look and feel for wholesale/retail customer groups.
...
Hi,
I am new to Zend Framework. I am trying to integrate TCPDF with my controller so that I can generate PDFs on the fly. I'd like to put the entire TCPDF folder in library/tcpf (instead of the public folder where it is now) and have the application run but I dont seem to be able to get Zend to see it and use it. I read through the loa...
I was reading the answer to the question here and the wording was a bit confusing. I shortened the sentences to focus on my question
First preDispatch() is called for instances of
Zend_Controller_Plugin_Abstract...
init() of the Zend_Controller_Action is called next...
The controller's preDispatch() method is called here...
...
Hello Experts!!
I've started reading on zend framework and it's use with Doctrine and have implemented a small project to grasp the understanding.I've come to a point where i needed my model generated as in having a generate script like the one suggested in Doctrine 1.2.2 pdf manual.After few unsuccessful attempts like
Class 'sfYaml...
You've probably heard of the Fat Model/Thin Controller vs. Thin Model/Fat Controller distinction. I recently heard that you can have something in between where some of the logic from the model goes into a service layer. How common is this? and do you know of (or can think of) any real examples that illustrate it?
...
Just a quick question if someone has already that kind of setup or if there is some source code on the web.
I want to add some javascript validation to some Zend Forms. The straight forward approach would be to write the javascript myself but let's say it's time consuming(and that's not the kind of code your really want to write all da...
Action Helpers are recommended in general over extending Zend_Controller_Action.
Looking at some of the applications you've built recently, what did you use Action Helpers for?
...