Hey guys, im new to Zend, ive been a long time user of Cake, I have a few questions related to conventions, etc.
1. Can someone possibly post a bootstrap/index file for a modular file convention where there are seperate controllers/views for public and admin modules that share models?
2. Is there a 'magic' save() method for saving to the database? I see currently there is Insert & Update, I dont mind using insert & update, was just curious.
3. Is there any kind of table inflection when you insert or update? What I mean is if you have a table with 2 columns, id & name the array I try to insert has 3 array keys for id, name & created it throws an error - Cake does table inflection where it only attempts to save columns that exist in the table.
4. Is there any decent way to autoload models instead of doing.... $this->someModel = new someModel; in the init() of every controller?
5. Whats the correct method for gathering the filtered data from a controller, I saw in a tutorial where you basically check if the request is a post, then you assign the POST array to a variable, then you loop through each array key and do getValue() from the Form object...like this...
$formModel = new FormModel;
$dbRow = array();
foreach($postArray as $pKey => $pValue) {
$dbRow[$pKey] = $formModel->getValue($pKey);
}
Is that the best way?
Thank you





. The ZF, however, is not like PHP and is fairly difficult to learn. There's quick and dirty feel to it like php. Its structured and BIG and a great pain in the ... well you get my point.
.

Bookmarks