[fw-general] Undefined class constant 'EXCEPTION_NO_ROUTE'??

2010-03-30 Thread Dasn
Hello guys, I write a web application on my localhost (windows) and everything works fine, but on a remote server (linux), it reports: Fatal error: Undefined class constant 'EXCEPTION_NO_ROUTE' in /path/to/application/controllers/ErrorController.php on line 12 It seems wired to me, since

Re: [fw-general] model attached to a view helper

2010-03-30 Thread Chris Morrell
The example warns about calling action() which has to clone half the dispatch process, dispatch a new action, grab the response body and return it. Obviously that's a pretty expensive call. That said, I have to agree with the commenter. You could get a similar result with: class My_View_Helper_

Re: [fw-general] model attached to a view helper

2010-03-30 Thread Cameron
I frequently pass full model instances through to my views and retrieve information from them, but I don't write code in the models that is specifically used for display purposes - as an example, if there's a method calculateOutstandingBalance(), it's just going to return a float, it's the exact sa

Re: [fw-general] Using Zend_Rest_Server with Zend_Controller

2010-03-30 Thread Narinder Chandi
Hi. I am not using Zend_Rest_Route so I can't say but it looks like the way to do it. Did you try it to see if it works? Regards, Narinder. -- on 30/03/2010 23:34, robert mena at robert.m...@gmail.com wrote: > Hi, > > Just to make sure I understand correctly: > > a) In my index.php (bootstr

[fw-general] model attached to a view helper

2010-03-30 Thread My Lists
Hello people, check out this example found at : http://framework.zend.com/manual/en/performance.view.html class My_View_Helper_BugList extends Zend_View_Helper_Abstract {     public function bugList()     {         $model = new Bug();         $html  = "\n";         foreach ($model->fetchActive()

Re: [fw-general] Using Zend_Rest_Server with Zend_Controller

2010-03-30 Thread robert mena
Hi, Just to make sure I understand correctly: a) In my index.php (bootstrap) $front = Zend_Controller_Front::getInstance(); $front->addModuleDirectory('../application/'); // I only wat my RestController of my default module to be handled by the Zend_Rest_Route $restRoute = new Zend_Rest_Route($

[fw-general] Passing objects to partials - alternative approaches

2010-03-30 Thread jsuggs
Ok, so you can't pass objects to partials (unless they can be converted to an array). So, what alternatives do you have/suggest for being able to pass objects (in this case Doctrine Entities/Models) to something like a partial so that you can add markup to a .phtml file? I guess what I'm wanting

[fw-general] Re: Is there a way to generate views from Zend_Form ?

2010-03-30 Thread Keyne
How do you do with table relationships? When using view helpers to loop through forms... Hector Virgen wrote: > > You could create a view helper that loops through the form's elements to > generate a basic view. > > In its simplest form, it could be something like this: > > class Default_Vie

Re: [fw-general] Using Zend_Rest_Server with Zend_Controller

2010-03-30 Thread Narinder Chandi
Sorry, accidentally clicked Send before completing the mail! Hi. This is an interesting question - something I've recently tackled myself. I read through this topic in several of the ZF books to get an idea. I concluded (rightly or wrongly) that if you want to handle all of the standard http acti

[fw-general] Re: Zend_Form text element is always null

2010-03-30 Thread Ethan Gruber
Actually, I found this, which helped me solve the problem: http://n4.nabble.com/Zend-Form-getValue-whatever-is-empty-td659679.html -- View this message in context: http://n4.nabble.com/Zend-Form-text-element-is-always-null-tp1745680p1745828.html Sent from the Zend Framework mailing list archive

[fw-general] Using Zend_Rest_Server with Zend_Controller

2010-03-30 Thread robert mena
Hi, What's the correct way to use Zend_Rest_Server with the MVC (i.e Zend_Controller_Action)? I've read about the Zend_Rest_Route but should I have my Controller inherit Zend_Rest_Controller (or define the index/put/get/post/deleteAction) and put the new Zend_Rest_Server() / handle inside a cert

[fw-general] Good practice for caching objects

2010-03-30 Thread Jurian Sluiman
Hi all, I'd like to have a discussion about caching and the things you exactly want to cache. The production servers running my application complain sometimes about memory (my local server not btw). I think one cause might be the method of caching. At this moment I cache most models from the datab

[fw-general]About N-tier app development with zf

2010-03-30 Thread Yue Yuanyuan
Hi, I have working a project which combines a website and mobile app together. So my idea is that separate the business logic and business presentation logic into two layers. The design aim is that each layer could be distributed on different multiple servers and could be replaced by other langua

[fw-general] Zend_Form text element is always null

2010-03-30 Thread Ethan Gruber
Hi, I have a form that successfully uploads a file to the server. I want to improve the form by having a text input. The input is defined as follows in the code that describes the form: $form->addElement('text', 'filterstring'); $textElement=$form->getElement('filterstring');

[fw-general] Re: Is there a way to generate views from Zend_Form ?

2010-03-30 Thread Keyne
Thank you so much Hector. This is very useful. -- View this message in context: http://n4.nabble.com/Is-there-a-way-to-generate-views-from-Zend-Form-tp1745449p1745667.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Zend_File_Transfer multiple file validation issue

2010-03-30 Thread Taha Bayrak
2 Questions about Zend_File_Transfer: 1- What's the best way of renaming multiple files using Zend_File_Transfer? I found the following example in the manual ( http://framework.zend.com/manual/1.9/en/zend.file.transfer.filters.html): $upload->addFilter('Rename', 'C:\picture\newjpg', 'file1')

Re: [fw-general] Is there a way to generate views from Zend_Form ?

2010-03-30 Thread Hector Virgen
You could create a view helper that loops through the form's elements to generate a basic view. In its simplest form, it could be something like this: class Default_View_Helper_FormView extends Zend_View_Helper_Abstract { public function formView(Zend_Form $form) { $html = "";

[fw-general] Is there a way to generate views from Zend_Form ?

2010-03-30 Thread Keyne
I was wondering if is there an easy way to generate views from form objects when dealing with CRUDs. I mean, when we have these options: VIEW | EDIT | DELETE I want my VIEW option like EDIT option, but without form elements, just the values. This will minimize so much the time spent to create

Re: [fw-general] Navigating ZF manual

2010-03-30 Thread Maghiel Dijksman
Also agree. Thanks a lot for your script! Regards, Maghiel On 29-3-2010 23:25, Hector Virgen wrote: I agree, the navigation could use some work. Ctrl+F can only take you so far (you have to know what you're searching for). -- Hector On Mon, Mar 29, 2010 at 2:23 PM, Chris Morrell

[fw-general] RE: several projects library outside - newbie

2010-03-30 Thread mem
I will then, for now, forget about the library shared for all projects since I don't host them all in the same server, I'm on a shared host environment and I don't wish to tweak the local structure to the remote one each time I need to upload. I will, however, consider changing the workflow late

Re: [fw-general] Get View object inside a controller plugin

2010-03-30 Thread Саша Стаменковић
Zend_Controller_Front::getInstance()->getParam('bootstrap')->getResource('view'); Regards, Saša Stamenković On Tue, Mar 30, 2010 at 12:02 PM, wrote: > Hi, > how i can get the view object from a controller plugin? > > Now i put Zend_View in the Registry during the bootstrap, but i am asking > m

[fw-general] Get View object inside a controller plugin

2010-03-30 Thread info
Hi, how i can get the view object from a controller plugin? Now i put Zend_View in the Registry during the bootstrap, but i am asking myself if exists a better method. Antonio

[fw-general] RE: several projects library outside - newbie

2010-03-30 Thread dmitrybelyakov
MEM wrote: > > I see, since I don't have access to php.ini on my shared host env, I can > do > an include on index.php that stays on my public folder, for example. > Yes, you can add things to your include paths in index.php. I think it was somewhere on the quickstart guide, but anyway here's

[fw-general] RE: several projects library outside - newbie

2010-03-30 Thread MEM
> You don't need to make any symlinks - just make sure the > library directory is on your php include paths by modifying php.ini or > just > manually in your index.php for example. I see, since I don't have access to php.ini on my shared host env, I can do an include on index.php that stays on my