zend-framework

What is the proper syntax for describing a <SELECT> form element to Zend_Form using XML as the config?

I am using an XML config file to tell Zend_Form what elements I want. I would like to have a <select> element, but I am unsure as to how to add <option> tags using the XML syntax. Sure I am missing something pretty basic. Ben ...

How to avoid saving escape character (\) in db

I'm using zend frame work zend form and zend db for my project. The problem I have is, when the user enter some special characters in the text field (i.e "I'm"), it is saved in the database with the "\" character (i.e. "I\'"). I need to know how to fix this so it just saved as whatever the user entered. ...

Zend_Db_Select where() and Zend_Db_Adapter quoteInto()

Are Zend_Db_Select's where() method, when including the optional value to quite into, and Zend_Db_Adapte's quoteInto() methods basically the same as far as escaping SQL? In other words, are these two pieces of quote identical and equally secure? $select->where($this->getAdapter()->quoteInto('id = ?', 3)); $select->where(id = ?, 3); ...

How to integrate "basic" website into Zend Framework

Hi guys, I have a website that has around 10 pages. Only one of those pages uses Zend (to integrate with Google gData). Right now, it's just all coded into that one page, but I'm wanting to learn how to use Zend Framework. How do you handle basic-relatively static php pages within Zend Framework? Do you just stick the whole individua...

PHP 5: What DAL are you using?

hello I'm new to PHP and I recently started learning Zend Framework. What DAL are you using? Do you think that Zend_Db_* can do the magic? I need it mainly for MySql db. Does it have any limitations and can I use it in big project without any problems because I don't want to go the wrong way. 10x ...

ZF Site in ZF Site? How do I redirect form subdirectory to another subdirecotry?

The deal is that I have a ZF site for which root directory is /public. How should I go about redirecting to a subdirectory if I want to do next? I want to have another subdirectory under /public/ that would not be linked to a main website in any way except it using save ZF. Lets say I have this: /public/newsite/ which will include a com...

Zend framework: Forms in modules

Hi, What I want to do: Create a number of modules with the forms folder inside them. What I did: Create a bootstrapper inside the module and added an _initAutoload function with the specific module name as namespace. For instance, an admin module with the following bootstrapper: class Admin_Bootstrap extends Zend_Application_Mod...

Retrieve Domain Name instead of IP

All, I am using the following command to retrieve the domain name of my server. $_SERVER['HTTP_HOST'] This seems to return the IP address instead of domain name like www.example.com. I looked at PHPInfo and it also lists an IP address for HTTP_HOST instead of Domain name. What do I need to change to make the domain name appear instea...

Pagination in a Rich Domain Model

I use rich domain model in my app. The basic ideas were taken there. For example I have User and Comment entities. They are defined as following: <?php class Model_User extends Model_Abstract { public function getComments() { /** * @var Model_Mapper_Db_Comment */ $mapper = $this->getMapper(); ...

Zend Framework date without hours minutes and seconds

Anybody can help me to get date formated with Zend framework What I do is: <?php echo new Zend_Date(2010-05-23, false, 'en');?> Result I get is: May 22, 2010 12:00:00 AM I what I need is: May 22, 2010 Thanks. ...

Zend Framework-using bootstrap.php vs application.in? Confused about the difference

Hi guys, I'm working my way through some tutorials. I see the Zendcasts tutorials have me setting up a lot of things in the bootstrap.php file, while with the quickstart and other tutorials, don't even touch that file and do a lot of changes in the application.ini file. What is the difference between the two and why use one over the ot...

Zend Framework-Do images, mp3s, scripts, etc, just go in public folder?

I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D I understand that the public folder is the folder that the world has access to. I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc W...

Recommended place for pre-translated Zend Framework resources

Since zf 1.10 Zend Framework ships with pre-translated validation messages. They are outside the library path. The manual illustrates how to load these in your bootstrap. $translator = new Zend_Translate( 'array', '/resources/languages', $language, array('scan' => Zend_Locale::LOCALE_DIRECTORY) ); Zend_Validate_Abstra...

Zend framework learning

hello guys my question is: Where is the best way or resource to learn zend as a professional? ...

how to combine widget webapp framework with SEO-friendly CSS and JS files

Hi guys, I'm writing a webapp using Zend framework and a homebrew widget system. Every widget has a controller and can choose to render one of many views if it chooses. This really helps us modularize and reconfigure and reuse the widgets anywhere on the site. The Problem is that the views of each widget contain their own JS and CSS ...

Adding Parameters to Zend_Navigation

I have a problem with Zend_Navigation that I am hoping for a little guidance on. I'm in the process of adding a Zend_Navigation to a legacy app as described [here on SO].1 The thing that I am not sure of is how to add parameters to the navigation menu after the data is loaded from the xml file. What I want to do is get 2 identifying p...

Do you have to use zf tool when creating controller, model, action etc... in zend framework

I am using zend framework 1.10. I use the zf tool to create controllers, actions and everything else. It is handy, but I am now seeing that when it modifies existing controller files to add new actions it realigns my code and removes some function closing brackets. I then see all these errors in eclipse. I see that everytime i issue a zf...

what is advantage of using headlink() to insert javascript and css in zend framework?

Documentation says to use headlink()->prependstylesheet() to insert css in the layout file. Also says to use to load the javascript files this way also. Why is this any better than just hard coding the link and script tag right in the header? I would think this is slower performance since its using the framework methods to do it. Using z...

How to enable SQL output to log file with Zend_Db?

I wonder if this possible with Zend_Db, but I am looking for something like SQL query logging similar to how Hibernate does it, where it shows you what SQL it generates in the log file. ...

php cache zend framework

server side is PHP + zend framework. problem: i have huge of data appox 5000 records and no of columns are 5 in input.txt file. i like to read all data into memory only once and send some data to the every browser request. but if i update that input.txt file then updated data must be auto synchronized to that memory location. so i n...