1
голосов
2ответов
838 просмотров

Zend Framework asking for view script despite setNoRender

I've made an API controller with some actions to spit out JSON for my app and I've turned off the layout and view renderer in its init() method so I've got no view scripts for this controller. I'm trying to use my apiController::treeAction elsewhere in the app via an actionHelper to output some ...

0
голосов
1ответов
1085 просмотров

Zend Form Field Mapping To DB Columns

I have a Zend_Form $form = new My_Form(); $uploadedData = $form->getValues(); Zend_Debug::dump($uploadedData, $form->name,true) and when i dump the form values i get a string array array(11) { ["event"] => string(2) "26" ["firstname"] => string(3) "sdf" ["surname"] => str...

2
голосов
2ответов
987 просмотров

SVN externals and export for framework

I'm currently working on a framework for a client. The framework is based upon Zend Framework. The directory structure is: application : Application specific code application/modules/frontend : Application specific code application/modules/backend : Backend for MyFramework ...

1
голосов
2ответов
1383 просмотров

zend set/getScriptPath problem:

I'm working my way through the Apress book "Beginning Zend Framework" - and am struggling to get one of the examples to work. The aim is to circumvent the standard directory structure using setScriptPath. Rather than storing the action's associated view script in the scripts directory, the tuto...

30
голосов
2ответов
9369 просмотров

Architecture of a PHP app on Amazon EC2

I recently experienced a flood of traffic on a Facebook app I created (mostly for the sake of education, not with any intention of marketing) Needless to say, I did not think about scalability when I created the app. I'm now in a position where my meager virtual server hosted by MediaTemple isn'...

0
голосов
2ответов
2059 просмотров

Using Zend Framework with CodeIgniter in XAMPP problem

This article explains how to use Zend in Codeigniter.http://www.beyondcoding.com/2008/02/21/using-zend-framework-with-codeigniter/ I am using XAMPP and having difficulties with path. Q1. I am not sure what is going on here. Why do I need to set this one? ini_set('include_path', ini_get('includ...

1
голосов
4ответов
6094 просмотров

Can we lock tables while executing a query in Zend-Db

I am talking about doing something like this: LOCK TABLE page WRITE; SELECT * FROM page WHERE col = 'value'; INSERT INTO page(col1, col2) VALUES('val1', val2); UNLOCK TABLES;

0
голосов
1ответов
1408 просмотров

Zend_Dojo_Form onSubmit

I have a contentPane with a remote form, I'm trying to get the form to submit, and stay within the pane, either displaying the form again on error or reporting success. I'm sure this is easy but I'm stumped, not the first time and not the last I'm sure. Store Form : class Services_Form_Sto...

7
голосов
1ответов
7314 просмотров

How to access URL parameters in bootstrap

I'm trying to capture a URL parameter in my bootstrap file but after several attempts I'm not able to do it. I've tried this but it does not work: protected function _initGetLang() { $frontController = Zend_Controller_Front::getInstance(); $lang= $frontController->getParam('lang'); } I...

0
голосов
3ответов
1371 просмотров

Zend Framework subdomain problem

I am using .ini file to add routes in my application. resources.router.routes.username.type = "Zend_Controller_Router_Route_Hostname" resources.router.routes.username.route = ":username.example.com" resources.router.routes.username.defaults.module = "userinfo" resources.router.routes.username.ch...

0
голосов
1ответов
241 просмотров

Custom routes and i18n

I am very experienced with the CakePHP framework but am checking out the Zend Framework for an application that will receive massive traffic. I need to set up some non-standard routes and add in i18n (url-based) and have seen some parts of the reference documentation that refer to this, and crea...

0
голосов
2ответов
123 просмотров

Simplest model code

I am very experienced with the CakePHP framework but am checking out the Zend Framework for an application that will receive massive traffic. I'm going through the quickstart tutorial in the documentation and got to the "Create a Model and Database Table" page. Must I or should I create all tho...

0
голосов
2ответов
414 просмотров

Can (and should?) Zend_Auth return class as the Identity?

I have a class R00_Model_User, which, curiously enough, represents user as he is. Can $result->getIdentity() return me an object of this class? (Or maybe it's stupid?) (There is a factory method in R00_Model_User which prevents from duplicating objects. I'd like Zend_Auth to use it instead of...

0
голосов
2ответов
541 просмотров

Zend_Layout display Login or Navigation

iam not sure if iam doing it the right way. My Goal is to display in my Layout an Login or an Navigation at the header section. My implementation looks like this (without logic): 2 Layout scripts: login.phtml navigation.phtml An FrontController Plugin: class Plugin_Header extends Zend_Con...

20
голосов
7ответов
75384 просмотров

Zend Framework - Set 'selected' value in select box dropdown list

I am adding a select element to a Zend_Form instance as follows: $user = $form->createElement('select','user')->setLabel('User: ')->setRequired(true); foreach($users as $u) { if($selected == $u->id) { $user->addMultiOption($u-&gt...

0
голосов
2ответов
152 просмотров

same password for multi-users in zend

I have the following scenario in zend framework: Data Table of students Table of classes, which contain many students each. Table of assignments, each of which is assigned to a class and given a password I want students to be able to access an assignment given that assignment's id and shared pa...

3
голосов
2ответов
725 просмотров

How to retrieve the Zend_Config used by Zend_Application?

I'm migrating my app to use Zend_Application for bootstrap. I used to have the Zend_Config as a key for my $registry. Now I don't know how to use it this way anymore (without having to reload the config file). I know it's possible to use $application->getOptions(), but that gives my an array ...

1
голосов
4ответов
1155 просмотров

MVC (PHP): Do Controllers/Actions map to each and every request?

I've been getting to grips with MVC (in PHP) by way of Zend. My understanding of the Zend Framework is that each type of user request maps to a specific controller (which in turn may or may not map to a model), and each action maps to a view. I've noticed the same pattern in Codeigniter and Kohan...

1
голосов
1ответов
1357 просмотров

Zend Db Update Not working

My table structure is: TABLE `licenses` ( `id` int(11) NOT NULL auto_increment, `code` varchar(30) collate utf8_unicode_ci NOT NULL, `title` varchar(255) collate utf8_unicode_ci NOT NULL, `description` text collate utf8_unicode_ci NOT NULL, `license_type` char(1) collate utf8_unicode_ci NOT NULL...

0
голосов
1ответов
117 просмотров

Save to session - Does a cache mean the back end code doesn't always run?

So for a bit of background, I am creating a website with the Zend Framework. There is a page where I am using AJAX to save a rating to my database. I obvious need the key for the store in order to know what store the rating is to be saved for. In order to access the store for the page, the URL...

0
голосов
1ответов
1177 просмотров

Zend Framework ErrorController not working on live site?

My site is set up pretty much as per the Zend Quickstart guide. The default ErrorController works locally using MAMP. But now I've deployed it to my live site I get a blank page and a "500 Internal Server Error" according to FireBug when I go to an action that doesnt exist. On my local server I...

6
голосов
4ответов
394 просмотров

How much "unlearning" when I move to a PHP framework

I'm aware of the benefits of using a PHP framework (not first hand though, just by reading SO, etc.) But what I don't hear about is the amount of "unlearning" a framework requires. When using a framework, you hand control to the new framework and you have to "unlearn" many things and re-learn the...

0
голосов
1ответов
3228 просмотров

dojo file upload using zend framework problem

I am struggling with a bit of dojo that is needed to upload a file. Now the file upload form sits within a dojo dialog box, so is hidden until the user selects an 'upload file' button. This button can be clicked on anywhere on the site, so I've created a controller to handle the upload. At the...

0
голосов
2ответов
361 просмотров

Why is the analyzer defined globally in Zend.Search.Lucene?

I just noticed that the Zend lucene implementation has a default analyzer that can be modified using Zend_Search_Lucene_Analysis_Analyzer::setDefault(), but I couldn't find a way to override that default when performing a query. Do I really need to reset the default analyzer if I'm working on mul...

0
голосов
1ответов
344 просмотров

porting template to zend framework

I got few issues proting a pear based form to zend form. I have few elements I need : Basic Elements Groups Group Elements Sections I previously used templates to render the forms on Pear. I obviously cannot use pre-existing zend decorators, since I need to specify css classes for each of the...

5
голосов
3ответов
5692 просмотров

Zend Framework rememberMe() doesnt seem to remember me

My session seems to only be valid in the current window/tab. Also it seems to timeout quickly. Heres how I'm currently attempting to do it: This is in my login controller: $adapter = $this->getAuthAdapter($data); $auth = Zend_Auth::getInstance(); $result = $auth->authenticate($adapter...

1
голосов
2ответов
2164 просмотров

using LIKE with ZEND_DB

I want to use a query which uses LIKE .. for e.g select * from xxxx where zzzz LIKE 'a%'; How can I do that using Zend DB? I have already tried something like $db->query('SELECT * FROM XXXX where zzzzz LIKE ?',' but it is not working. Thanks ' . $query .'% but it is not working. Thanks '); ...

2
голосов
1ответов
2843 просмотров

Zend_Tool: Fatal error: Cannot redeclare class Zend_Loader

I am able to create new projects with... zf create project ProjectName ...but this creates a project without copying the Zend Framework library. So I copy ZF into my project library and try to create a controller... zf create controller auth ...and I get this message: Fatal error: Cannot r...

0
голосов
1ответов
284 просмотров

Use of any class / namespace with ZendFramwork

EDIT: Additional questions: do I have to add the '.php' at the end of new NAMSPACE_CLASSNAME Can I access any Zend package inside my controller / model, for example: /* Controller // Methods // inside a */ method $client = new Zend_Http_Client('http://exa...

1
голосов
1ответов
649 просмотров

Exclude elements while validating a Zend Form

I have a Zend Form with a subform which only is shown when the user selects a specific checkbox. Some of the fields in the subform are required IF the checkbox is selected, otherwise, the fields in that subform should be ignored by IsValid. What would be the way to go here?