[fw-general] Newbie: use of Zend_Cache_Frontend_Page in controller

2008-12-11 Thread joostvanveen
I am trying to cache an entire page, bypassing all database and business logic. I put this code into my controller, but it doesn't work. No cache file is saved in my cache directory. What a I doing wrong? 7200, 'debug_header' => true), array('cache_dir' => '../application/data/cache/') );

[fw-general] Return last inserted id

2008-12-11 Thread Daniel Latter
Hi, How can I get the last inserted ID from a newly inserted row? My class extends Zend_Db_Table and uses code similar to: $row = $this->createRow(); $row->title = $feedDetails['feedTitle']; $row->description = $feedDetails['feedDesc'];; $row->link = $feedDetails['feedLink']; $row->save(); ret

[fw-general] Re: Return last inserted id

2008-12-11 Thread Daniel Latter
got it using this: $registry = Zend_Registry::getInstance(); $config = $registry->get('config'); $db = Zend_Db::factory($config->db); return $db->lastInsertId(); Thank You Daniel Latter 2008/12/11 Daniel Latter <[EMAIL PROTECTED]> > > Hi, > > How can I get the last inserted ID from a newly inse

Re: [fw-general] Return last inserted id

2008-12-11 Thread Ryan Mauger
$row->save() returns the primary key value of the row. so try: return $row->save(); Ryan Mauger Daniel Latter wrote: Hi, How can I get the last inserted ID from a newly inserted row? My class extends Zend_Db_Table and uses code similar to: $row = $this->createRow(); $row->title = $feedDetail

[fw-general] Quick question re an XSLT based Zend_View

2008-12-11 Thread Colin Guthrie
Hi, I'm in the position where I'd like to use XSLT scripts to render parts of my output (probably partials). In order to achieve this, I think it makes sense to create a Zend_View_Xslt class that implements Zend_View_Interface. That much makes sense. That said I'd be surprised if noone has

[fw-general] Question on filtering a folder name ?

2008-12-11 Thread Cristian Bichis
Hi, I am tryong to filter one folder name i am receiving from user side. Basically i am receiving a string and i want to be sure it does contains only folder name (as: folder_name or folder123) but not some things like that: ../folder or /folder_name or ..folder/folder1/folder2 aso Any ide

[fw-general] URL Issue

2008-12-11 Thread isporter
My application works fine on my local machine and the previous build worked fine on my remote machine. On updating the remote copy however, I've introduced URL problems. Where I previously acccessed an action via http://domain.com/controller/action/, and this still works in my local environment,

Re: [fw-general] Question on filtering a folder name ?

2008-12-11 Thread Cristian Bichis
Just a mention. Folder name is received by POST (as POST variable). So i am not talking about any GET thing. Hi, I am tryong to filter one folder name i am receiving from user side. Basically i am receiving a string and i want to be sure it does contains only folder name (as: folder_name or

[fw-general] Unit testing utf8 characters

2008-12-11 Thread Josh Lebal
Hello, I'm quiet new to Zend Framework so I hope I'm posting in the right ml. I'm trying to unit test some forms ; i noticed that I had a problem using this request : $this->request ->setMethod('POST') 'firstname' => 'ééàüi', 'lastname'=>

Re: [fw-general] Unit testing utf8 characters

2008-12-11 Thread troels knak-nielsen
On Thu, Dec 11, 2008 at 3:26 PM, Josh Lebal <[EMAIL PROTECTED]> wrote: > Well, I checked the thing works like a charm manually so I thought maybe it > was a unit test problem. Which encoding are you saving the source-file in? If you save it as UTF-8, then those characters will be utf-8 encoded. If

[fw-general] appendScript doesn't work

2008-12-11 Thread Markus Hausammann
Hi I'm doing this in my action: $chartLoader = 'swfobject.embedSWF("open-flash-chart.swf", "mainRadar", "550", "200", "9.0.0", "expressInstall.swf", {"data-file":"project-charts/main-radar.php"} );'; $this->view->headScript()->appendScript($chartLoader, $type = 'text/javascript'); in my layout

Re: [fw-general] Problems with View Helpers with update 1.5.1 to 1.7.1

2008-12-11 Thread J Sanchez
I found the solution in zend_loder_plugin it needs a clase pefix and the only it have is "Zend_View_Helper_" try to ranema your clase with this prefix and it will work!!! -im awsome jajaja kabel2 wrote: > > Any other ideas on what might be causing this? > > Is anyone else able to duplicate

[fw-general] Passing an object between actions.

2008-12-11 Thread sinkingfish
Hi, I am looking to pass an object (zend_form to be exact) between 2 actions and am wondering is there a best practice or even a facility in zend framework? I'm considering 3 ways : 1. make the object a class variable and access using $this 2. Serialize the the object and pass it as an a parame

RE: [fw-general] Passing an object between actions.

2008-12-11 Thread Jan Pieper
http://framework.zend.com/manual/en/zend.registry.html > -Original Message- > From: sinkingfish [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 11, 2008 6:24 PM > To: fw-general@lists.zend.com > Subject: [fw-general] Passing an object between actions. > > > Hi, > > I am looking to

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread Giorgio Sironi
2008/12/11 sinkingfish <[EMAIL PROTECTED]> > I am looking to pass an object (zend_form to be exact) between 2 actions > and > am wondering is there a best practice or even a facility in zend framework? > For a simple approach, I suggest pass it to a placeholder helper. (also the registry is possi

Re: [fw-general] Newbie quesiton - How do queries that join multiple tables fit into the model in the MVC

2008-12-11 Thread Julian102
Thank you both for your replys they're very much appreciated. I am still however having some difficulty in understanding the model and would be very greatful if you could look at the following simple example and let me know where im going wrong. I am about to build a simple site where users can a

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread Jason Webster
As far as I know, you do not have to serialize arrays or objects if you pass them as a parameter to _forward(). The _forward() method does not create a new HTTP request, it just bounces the current request object around within the dispatching process. sinkingfish wrote: Hi, I am looking to

Re: [fw-general] Problems with View Helpers with update 1.5.1 to 1.7.1

2008-12-11 Thread kabel2
I am not extending any classes or making classes of my own. I'm simply using the built in Layout view helper that is included with ZF. Therefore I don't think this is a valid solution. There is something wrong with my setup or there is a bug in the framework. J Sanchez wrote: > > I found the s

[fw-general] Open flash charts

2008-12-11 Thread Markus Hausammann
Hi guys I've just managed to make open flash charts work within my mvc application. Just wanted to ask if you know of a tutorial or something about how to do this, otherwise I would maybe write something up. M.

Re: [fw-general] Newbie quesiton - How do queries that join multiple tables fit into the model in the MVC

2008-12-11 Thread Bill Karwin
On Dec 11, 2008, at 9:48 AM, Julian102 wrote: Can anyone explain to me or show me somewhere that explains on a very high level for a beginner how the model fits into a system and how one should think about it when designing an application. For example should the model be designed at the sa

Re: [fw-general] Newbie quesiton - How do queries that join multiple tables fit into the model in the MVC

2008-12-11 Thread PHPScriptor
Hmmm these are very basic questions and should take a lot of time to explain. All depends on what you have and what you want. If I were you, I would start with building the database. So you know what tabels you have, and the fields you need. Then you can start thinking about your website structure

RE: [fw-general] Passing an object between actions.

2008-12-11 Thread sinkingfish
Thanks for the rapid reply, I thought the registry was more for things like static values, ie configs & db connections. Jan Pieper-2 wrote: > > http://framework.zend.com/manual/en/zend.registry.html > >> -Original Message- >> From: sinkingfish [mailto:sinkingf...@gmail.com] >> Sent:

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread sinkingfish
Cool thanks, I'll have a look at it when I get back into work. If I do a forward are the original values from the request still accessible? ta Brian jasonistaken wrote: > > As far as I know, you do not have to serialize arrays or objects if you > pass them as a parameter to > _forward(). > >

Re: [fw-general] Newbie quesiton - How do queries that join multiple tables fit into the model in the MVC

2008-12-11 Thread Daniel Latter
As a very loose, and general rule of of thumb the things that should be part of your model would things like generating / creating XML feeds , ie the code that does this, processing data you've got from a database, ie to prepare the data so your app can more easily use it, and generally thi

Re: [fw-general] Trying to start with Zend_Test

2008-12-11 Thread gerardroche
Hi, i got these same errors and when I updated phpunit they all went away :) http://www.phpunit.de/manual/3.3/en/installation.html Mauricio Cuenca wrote: > > Hello, I'm trying to do my first UniTests with the help of Zend_Test, but > there are some things that are not so clear to me. > > I'm