[fw-general] Get sql results in my Model (Zend_Db_Table)
Hello, In my web application I simply want to get the bookmarked articles of a user : select * from articles G, selections S where G.id_art = S.art_id and S.member_id = 2 and G.to_delete = 0; I want to get the result in my model object which extends Zend db table, "Article" (And I don't need the returned selections data of the query) What is the usual way to do such a thing ? Thank you ! -- View this message in context: http://www.nabble.com/Get-sql-results-in-my-Model-%28Zend_Db_Table%29-tp14370287s16154p14370287.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Get sql results in my Model (Zend_Db_Table)
class Selections extends Zend_Db_Table{ } class Articles extends Zend_Db_Table{ } $sel = new Selections; $sel->find(2)->findArticles(); Take a look at the manual section Zend_Db_Table Relationships to see how configurate your model to adapt to your db schema (member_id instead of the usual id etc) For the where (G.to_delete) clause AFAIK you will need the Zend_Db_Table_Select which is in incubator. Em Seg, 2007-12-17 às 05:15 -0800, debussy007 escreveu: > Hello, > > In my web application I simply want to get the bookmarked articles of a user > : > > select * from articles G, selections S > where G.id_art = S.art_id > and S.member_id = 2 > and G.to_delete = 0; > > I want to get the result in my model object which extends Zend db table, > "Article" > (And I don't need the returned selections data of the query) > > What is the usual way to do such a thing ? > > Thank you ! -- Abraço, Thiago Ferreira Equipe Técnica CVA-RICESU
Re: [fw-general] Reducing the number of loaded exception files
Shahar Evron wrote: 10 redundant include files have quite an impact on performance, especially in places where you have no opcode cache installed. If you don't have an opcode cache you simply don't care about performance. So why should we optimize for these people? There're a couple of opcode caches available and future PHP versions have APC bundled. The suggested optimization can be a) something like we did before - one central method, which didn't work so well b) repeated every time we need to throw an exception, which is bad practice and bad for readability IMO the best solution is a big banner "USE AN OPCODE CACHE IF YOU CARE ABOUT PERFORMANCE". nico
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
Hi! I'd love to be able to only subscribe fw-formats. fw-general has a very high noise level, especially if you don't use or need all components (i.e. we use our own db abstraction and mvc). Of course what makes the separate mailing list not that useful, is people sending everything to fw-general. If we would be stricter here all of the other mailing lists could start making sense. nico Wil Sinclair wrote: Does anybody find the concept of project teams (as laid out here: http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) worthwhile? That is to say, not just occasionally useful, but actually worth the extra effort to maintain and the additional complexity that they add to the overall project? Most of the project team pages on the wiki are woefully out of date at this point, and I happen to be very skeptical about any process or structure that isn't part of any critical workflow for a project- they tend to get abandoned as soon as higher-priority and more immediate tasks come up- as these seem to have been. Also- separate mailing lists- same question. Only 3 lists get more than the occasional mail: general, mvc, and db. I'd venture to guess that most of us subscribe to all 3 of these, and people tend to cross- post or post specific questions in general if they want to make sure everyone reads them anyways. Our traffic across all mailing lists adds up to about 5-10 mails per day, which IMO is a nice lively- but not overwhelming- mail rate on a list. If you think that some of these separate lists are useful, why and which ones? Please keep in mind the potential confusion of those new to framework who have a question and may not know which place is best to post it or that some of these lists are not widely read. Thanks for any feedback. ,Wil
[fw-general] findManyToManyRowset - where/order/limit/offset
i can't find any example on how to add where, order by and limit/offset conditions when using findManyToManyRowset(). so i would like to do where/order/limit/offset for findManyToManyRowset() similar to fetchAll(), any docs/examples? Aljosa
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
Hi Wil, I agree that too many lists could create confusion. However, merging all lists into a single one might create more confusion than a list for each team. I would personally suggest at least two lists, one for end users topics and one focused on development of the framework itself... as a starting point. Talking about project teams and wiki... I saw you just moved the most part of pages under /archive group that is write protected. It means, for instance, we cannot edit any team or translation page, such as http://framework.zend.com/wiki/display/ARCHIVE/Italian+%28Italiano%29 Is there any wiki reorganization in action? -- Simone wllm wrote: > > Does anybody find the concept of project teams (as laid out here: > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) worthwhile? > That is to say, not just occasionally useful, but actually worth the > extra effort to maintain and the additional complexity that they add to > the overall project? Most of the project team pages on the wiki are > woefully out of date at this point, and I happen to be very skeptical > about any process or structure that isn't part of any critical workflow > for a project- they tend to get abandoned as soon as higher-priority and > more immediate tasks come up- as these seem to have been. > Also- separate mailing lists- same question. Only 3 lists get more than > the occasional mail: general, mvc, and db. I'd venture to guess that > most of us subscribe to all 3 of these, and people tend to cross-post or > post specific questions in general if they want to make sure everyone > reads them anyways. Our traffic across all mailing lists adds up to > about 5-10 mails per day, which IMO is a nice lively- but not > overwhelming- mail rate on a list. If you think that some of these > separate lists are useful, why and which ones? Please keep in mind the > potential confusion of those new to framework who have a question and > may not know which place is best to post it or that some of these lists > are not widely read. > > Thanks for any feedback. > ,Wil > > -- View this message in context: http://www.nabble.com/Project-Teams-and-Separate-Mailing-Lists.-.-.-tp14360219s16154p14370312.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Possible bug in Pdo Mysql -> cannot update when : apperas in where array
Hello, I got follwin error Fatal error: Uncaught exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters' in /web/ugame/root/libs/Zend/Db/Statement/Pdo.php:227 Stack trace: #0 /web/ugame/root/libs/Zend/Db/Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array) #1 /web/ugame/root/libs/Zend/Db/Adapter/Abstract.php(396): Zend_Db_Statement->execute(Array) #2 /web/ugame/root/libs/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query('UPDATE `ugml_un...', Array) #3 /web/ugame/root/libs/Zend/Db/Adapter/Abstract.php(517): Zend_Db_Adapter_Pdo_Abstract->query('UPDATE `ugml_un...', Array) #4 /web/ugame/root/libs/class.bu_game.php(349): Zend_Db_Adapter_Abstract->update('ugml_universe', Array, Array) #5 /web/ugame/root/page.register.php(158): Bu_Game->putPlanet(Array) #6 /web/ugame/root/libs/class.page_render.php(125): require('/web/ugame/root...') #7 /web/ugame/root/libs/class.page_render.php(111): Bu_Page->getInclude(Array) #8 /web/ugame/root/libs/class.page_ren in /web/ugame/root/libs/Zend/Db/Statement/Pdo.php on line 227 when I was try to do this $_aPUpdate = array(); $_aPUpdate['some_fields'] = $some_data; $_aWhere[] = "planet_id = ".$_aPlanet['planet_id']; $_aWhere[] = "planet_location = ".$_aPlanet['planet_location']; $resPlanet = $this->db->update($this->prefix."universe", $_aPUpdate, $_aWhere); when I was remove the $_aWhere[] = "planet_location = ".$_aPlanet['planet_location']; it works $_aPlanet['planet_location'] contains someting like 1:300:23 or someting like that. Regards Sancar
[fw-general] catch sql statement execute error
Is there a good way to catch the sql statement execute error message when it is been fired? For example when I run the following two statements, how can I catch the error message if it happens during the running process? $stmtNode = $dbDrupal-> query("UPDATE node set title='" . $newName . "' WHERE nid='" . $forum . "'"); $stmtNode->execute(); -- View this message in context: http://www.nabble.com/catch-sql-statement-execute-error-tp14372542s16154p14372542.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] catch sql statement execute error
-- Kexiao Liao <[EMAIL PROTECTED]> wrote (on Monday, 17 December 2007, 07:23 AM -0800): > > Is there a good way to catch the sql statement execute error message when it > is been fired? > > For example when I run the following two statements, how can I catch the > error message if it happens during the running process? > > $stmtNode = $dbDrupal-> query("UPDATE node set title='" . $newName . "' > WHERE nid='" . $forum . "'"); > $stmtNode->execute(); Wrap it in a try/catch block. -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
The way I understood it, Will didn't suggest to move to one list. He just suggested that we could remove a few that don't generate traffic. One reason they might didn't generate traffic is the reason that the subscribe all didn't work. For the longest time I didn't receive the MVC emails because I subscibed to all and it didn't work. I think MVC and DB are fine. general might be split in general usage and general FW development. But this might result in less emails answered in general usage if developers skip that list. Just my thoughts. Gunter
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
Hi Wil, Re: e-mail lists. When the separate mailing lists were started, the lists were much more lively (in the range of about 50 e-mails a day, sometimes upwards of 100, if I recall correctly). At present the lists aren't as active, but I imagine once adoption picks up the traffic rate will also pick up again. -Matt On Sun, December 16, 2007 2:15 am, Wil Sinclair wrote: > Does anybody find the concept of project teams (as laid out here: > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) worthwhile? > That is to say, not just occasionally useful, but actually worth the > extra effort to maintain and the additional complexity that they add to > the overall project? Most of the project team pages on the wiki are > woefully out of date at this point, and I happen to be very skeptical > about any process or structure that isn't part of any critical workflow > for a project- they tend to get abandoned as soon as higher-priority and > more immediate tasks come up- as these seem to have been. > Also- separate mailing lists- same question. Only 3 lists get more than > the occasional mail: general, mvc, and db. I'd venture to guess that > most of us subscribe to all 3 of these, and people tend to cross-post or > post specific questions in general if they want to make sure everyone > reads them anyways. Our traffic across all mailing lists adds up to > about 5-10 mails per day, which IMO is a nice lively- but not > overwhelming- mail rate on a list. If you think that some of these > separate lists are useful, why and which ones? Please keep in mind the > potential confusion of those new to framework who have a question and > may not know which place is best to post it or that some of these lists > are not widely read. > > Thanks for any feedback. > ,Wil
[fw-general] RE: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to test
Just a note that I found while looking though the docs that there are a few extra ?> closing tags with some the examples? Should I just fix and submit the diff files back to the list? Jon Whitcraft Indianapolis Motor Speedway [EMAIL PROTECTED] Phone: (317) 492-8623 :: Fax: (317) 492-6419 -Original Message- From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] Sent: Sunday, December 16, 2007 10:58 AM To: fw-general@lists.zend.com; [EMAIL PROTECTED] Subject: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to test -- Łukasz Wojciechowski <[EMAIL PROTECTED]> wrote (on Sunday, 16 December 2007, 10:28 AM +0100): > I've made incubator's doc this morning. You can check it out under > > http://nostra.art.pl/Zend/Incubator/ Thanks for doing this! -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.
[fw-general] Re: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to test
-- Whitcraft, Jon <[EMAIL PROTECTED]> wrote (on Monday, 17 December 2007, 12:27 PM -0500): > Just a note that I found while looking though the docs that there are > a few extra ?> closing tags with some the examples? > > Should I just fix and submit the diff files back to the list? That would be great -- thanks! > -Original Message- > From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 16, 2007 10:58 AM > To: fw-general@lists.zend.com; [EMAIL PROTECTED] > Subject: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to > test > > -- Łukasz Wojciechowski <[EMAIL PROTECTED]> wrote > (on Sunday, 16 December 2007, 10:28 AM +0100): > > I've made incubator's doc this morning. You can check it out under > > > > http://nostra.art.pl/Zend/Incubator/ > > Thanks for doing this! -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
[fw-general] RE: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholdersready to test
Attached is a diff file fixing the three files that I found the mistake in. \incubator\documentation\manual\en\module_specs is the folder. Jon Whitcraft Indianapolis Motor Speedway [EMAIL PROTECTED] Phone: (317) 492-8623 :: Fax: (317) 492-6419 -Original Message- From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 12:46 PM To: fw-general@lists.zend.com; [EMAIL PROTECTED] Subject: Re: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholdersready to test -- Whitcraft, Jon <[EMAIL PROTECTED]> wrote (on Monday, 17 December 2007, 12:27 PM -0500): > Just a note that I found while looking though the docs that there are > a few extra ?> closing tags with some the examples? > > Should I just fix and submit the diff files back to the list? That would be great -- thanks! > -Original Message- > From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] > Sent: Sunday, December 16, 2007 10:58 AM > To: fw-general@lists.zend.com; [EMAIL PROTECTED] > Subject: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to > test > > -- Łukasz Wojciechowski <[EMAIL PROTECTED]> wrote > (on Sunday, 16 December 2007, 10:28 AM +0100): > > I've made incubator's doc this morning. You can check it out under > > > > http://nostra.art.pl/Zend/Incubator/ > > Thanks for doing this! -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/ This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted. Zend_Views-Helpers-docfix.diff Description: Zend_Views-Helpers-docfix.diff
[fw-general] Re: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholdersready to test
-- Whitcraft, Jon <[EMAIL PROTECTED]> wrote (on Monday, 17 December 2007, 12:52 PM -0500): > Attached is a diff file fixing the three files that I found the mistake in. > > \incubator\documentation\manual\en\module_specs is the folder. Applied in r7164. Thanks! > -Original Message- > From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 12:46 PM > To: fw-general@lists.zend.com; [EMAIL PROTECTED] > Subject: Re: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholdersready > to test > > -- Whitcraft, Jon <[EMAIL PROTECTED]> wrote > (on Monday, 17 December 2007, 12:27 PM -0500): > > Just a note that I found while looking though the docs that there are > > a few extra ?> closing tags with some the examples? > > > > Should I just fix and submit the diff files back to the list? > > That would be great -- thanks! > > > -Original Message- > > From: Matthew Weier O'Phinney [mailto:[EMAIL PROTECTED] > > Sent: Sunday, December 16, 2007 10:58 AM > > To: fw-general@lists.zend.com; [EMAIL PROTECTED] > > Subject: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholders ready to > > test > > > > -- Łukasz Wojciechowski <[EMAIL PROTECTED]> wrote > > (on Sunday, 16 December 2007, 10:28 AM +0100): > > > I've made incubator's doc this morning. You can check it out under > > > > > > http://nostra.art.pl/Zend/Incubator/ > > > > Thanks for doing this! -- Matthew Weier O'Phinney PHP Developer| [EMAIL PROTECTED] Zend - The PHP Company | http://www.zend.com/
RE: [fw-general] Project Teams and Separate Mailing Lists. . .
Well, I would call it more of a 'update' than a 'reorganization'. The development space had a bunch of outdated content on it that was generally misleading and gave the wiki a somewhat abandoned feel. While the user space can be more freeform, the development space we use for lots of structured, important content that we'd like to keep as clear and concise as possible. The page you mention happens to be under project teams, which are going away as a concept, although I don't want to take away any tools that are useful for anyone. Would you prefer a new translation section of the development space, or would you rather have the freedom of the user space to do pretty much whatever you want with it? ,Wil > Talking about project teams and wiki... I saw you just moved the most > part > of pages under /archive group that is write protected. > It means, for instance, we cannot edit any team or translation page, > such as > http://framework.zend.com/wiki/display/ARCHIVE/Italian+%28Italiano%29 > > Is there any wiki reorganization in action? > > -- Simone > > > wllm wrote: > > > > Does anybody find the concept of project teams (as laid out here: > > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) > worthwhile? > > That is to say, not just occasionally useful, but actually worth the > > extra effort to maintain and the additional complexity that they add > to > > the overall project? Most of the project team pages on the wiki are > > woefully out of date at this point, and I happen to be very skeptical > > about any process or structure that isn't part of any critical > workflow > > for a project- they tend to get abandoned as soon as higher-priority > and > > more immediate tasks come up- as these seem to have been. > > Also- separate mailing lists- same question. Only 3 lists get more > than > > the occasional mail: general, mvc, and db. I'd venture to guess that > > most of us subscribe to all 3 of these, and people tend to cross-post > or > > post specific questions in general if they want to make sure everyone > > reads them anyways. Our traffic across all mailing lists adds up to > > about 5-10 mails per day, which IMO is a nice lively- but not > > overwhelming- mail rate on a list. If you think that some of these > > separate lists are useful, why and which ones? Please keep in mind > the > > potential confusion of those new to framework who have a question and > > may not know which place is best to post it or that some of these > lists > > are not widely read. > > > > Thanks for any feedback. > > ,Wil > > > > > > -- > View this message in context: http://www.nabble.com/Project-Teams-and- > Separate-Mailing-Lists.-.-.-tp14360219s16154p14370312.html > Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Project Teams and Separate Mailing Lists. . .
I'm actually open to any suggestions here. That said, consolidating down to the a few of the more trafficked lists seems to be the most popular option so far. That seems reasonable to me; I'm more concerned about lists that might be ambiguous to the new user- like 'fw-core', 'fw-server', or 'fw-formats', which also happened to be the less trafficked ones. I would put forth that the only reason we have a subscribe all function is that we have too many lists. :) Having a separate list for 'developers' (ie users) and 'contributors' is an interesting idea, although there are those questions that could work in both, and I'd be reluctant to give any contributor an easy means for avoiding the basic usage questions. ;) There are positives and negatives to this idea, let's think about it. ,Wil > -Original Message- > From: Gunter Sammet [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 8:35 AM > To: fw-general@lists.zend.com > Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . > > The way I understood it, Will didn't suggest to move to one list. He > just suggested that we could remove a few that don't generate traffic. > One reason they might didn't generate traffic is the reason that the > subscribe all didn't work. For the longest time I didn't receive the > MVC emails because I subscibed to all and it didn't work. > > I think MVC and DB are fine. general might be split in general usage > and general FW development. But this might result in less emails > answered in general usage if developers skip that list. > > Just my thoughts. > > Gunter
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
Because translation activity is strictly part of Zend Framework development and improvements, and follows an internal workflow, including an SVN powered storage, I would suggest to think about a translation section under development area. Additionally, I remember I didn't provide much credit to User Space section when I first came across ZF framework, many months ago. I jumped directly to development section. I had a look to user area just a few weeks later, when I started to get involved into ZF development. This is why I think the translation section could find a better place under the development area. If you feel more comfortable it is possible to start with a small set of pages to reduce the number of outdated pages, including howto guidelines and other helpful information. Then each single user (translator) could decide to use custom pages under user area depending on custom needs. What do you think? -- Simone On Dec 17, 2007 7:33 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote: > Well, I would call it more of a 'update' than a 'reorganization'. The > development space had a bunch of outdated content on it that was > generally misleading and gave the wiki a somewhat abandoned feel. While > the user space can be more freeform, the development space we use for > lots of structured, important content that we'd like to keep as clear > and concise as possible. The page you mention happens to be under > project teams, which are going away as a concept, although I don't want > to take away any tools that are useful for anyone. Would you prefer a > new translation section of the development space, or would you rather > have the freedom of the user space to do pretty much whatever you want > with it? > > ,Wil > > > Talking about project teams and wiki... I saw you just moved the most > > part > > of pages under /archive group that is write protected. > > It means, for instance, we cannot edit any team or translation page, > > such as > > http://framework.zend.com/wiki/display/ARCHIVE/Italian+%28Italiano%29 > > > > Is there any wiki reorganization in action? > > > > -- Simone > > > > > > wllm wrote: > > > > > > Does anybody find the concept of project teams (as laid out here: > > > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) > > worthwhile? > > > That is to say, not just occasionally useful, but actually worth the > > > extra effort to maintain and the additional complexity that they add > > to > > > the overall project? Most of the project team pages on the wiki are > > > woefully out of date at this point, and I happen to be very > skeptical > > > about any process or structure that isn't part of any critical > > workflow > > > for a project- they tend to get abandoned as soon as higher-priority > > and > > > more immediate tasks come up- as these seem to have been. > > > Also- separate mailing lists- same question. Only 3 lists get more > > than > > > the occasional mail: general, mvc, and db. I'd venture to guess that > > > most of us subscribe to all 3 of these, and people tend to > cross-post > > or > > > post specific questions in general if they want to make sure > everyone > > > reads them anyways. Our traffic across all mailing lists adds up to > > > about 5-10 mails per day, which IMO is a nice lively- but not > > > overwhelming- mail rate on a list. If you think that some of these > > > separate lists are useful, why and which ones? Please keep in mind > > the > > > potential confusion of those new to framework who have a question > and > > > may not know which place is best to post it or that some of these > > lists > > > are not widely read. > > > > > > Thanks for any feedback. > > > ,Wil > > > > > > > > > > -- > > View this message in context: http://www.nabble.com/Project-Teams-and- > > Separate-Mailing-Lists.-.-.-tp14360219s16154p14370312.html > > Sent from the Zend Framework mailing list archive at Nabble.com. > >
RE: [fw-general] Project Teams and Separate Mailing Lists. . .
That seems reasonable to me. I don't see any issue with maintaining translation pages in development, but we should make sure we aren't setting ourselves up for getting immediately out of date. As far as I can tell, the areas that go out of date very quickly include the current status of the project, names of people working on the project, etc. And even these wouldn't be an issue if there is a lead maintaining the page, as with the Italian and French pages. So how about this? We can create a standard header for each translation so that all the information that is the same across the translations will appear in the same place, and custom content can go beneath. If no translation lead wants to take ownership of the page, the page will only contain that header, which would include stuff like the language name, a link to the docs on the wiki, and maybe a note that this translation is available for someone to actively lead. All of these pages can go under a new 'translations' page under the documentation guide (http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Documentati on+Guide). If we find that a translation page has gotten out of date, we can archive the custom content and leave the header. Do you find the concept of a 'translation team' useful? If so, what does it bring us? The other project team pages seemed to bring little value and mostly served to list the names of people who said they would help, but were busy when it came to the actual 'helping' part. J ,Wil From: Simone Carletti [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 10:49 AM To: Wil Sinclair Cc: fw-general@lists.zend.com Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . Because translation activity is strictly part of Zend Framework development and improvements, and follows an internal workflow, including an SVN powered storage, I would suggest to think about a translation section under development area. Additionally, I remember I didn't provide much credit to User Space section when I first came across ZF framework, many months ago. I jumped directly to development section. I had a look to user area just a few weeks later, when I started to get involved into ZF development. This is why I think the translation section could find a better place under the development area. If you feel more comfortable it is possible to start with a small set of pages to reduce the number of outdated pages, including howto guidelines and other helpful information. Then each single user (translator) could decide to use custom pages under user area depending on custom needs. What do you think? -- Simone On Dec 17, 2007 7:33 PM, Wil Sinclair < [EMAIL PROTECTED]> wrote: Well, I would call it more of a 'update' than a 'reorganization'. The development space had a bunch of outdated content on it that was generally misleading and gave the wiki a somewhat abandoned feel. While the user space can be more freeform, the development space we use for lots of structured, important content that we'd like to keep as clear and concise as possible. The page you mention happens to be under project teams, which are going away as a concept, although I don't want to take away any tools that are useful for anyone. Would you prefer a new translation section of the development space, or would you rather have the freedom of the user space to do pretty much whatever you want with it? ,Wil > Talking about project teams and wiki... I saw you just moved the most > part > of pages under /archive group that is write protected. > It means, for instance, we cannot edit any team or translation page, > such as > http://framework.zend.com/wiki/display/ARCHIVE/Italian+%28Italiano%29 > > Is there any wiki reorganization in action? > > -- Simone > > > wllm wrote: > > > > Does anybody find the concept of project teams (as laid out here: > > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) > worthwhile? > > That is to say, not just occasionally useful, but actually worth the > > extra effort to maintain and the additional complexity that they add > to > > the overall project? Most of the project team pages on the wiki are > > woefully out of date at this point, and I happen to be very skeptical > > about any process or structure that isn't part of any critical > workflow > > for a project- they tend to get abandoned as soon as higher-priority > and > > more immediate tasks come up- as these seem to have been. > > Also- separate mailing lists- same question. Only 3 lists get more > than > > the occasional mail: general, mvc, and db. I'd venture to guess that > > most of us subscribe to all 3 of these, and people tend to cross-post > or > > post specific questions in general if they want to make sure everyone > > reads them anyways. Our traffic across all mailing lists adds up to > > about 5-10 mails per day, which IMO is a nice lively- but not > > overwhelming- mail rate on a list. If you think that some of th
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
Gunter Sammet wrote: He just suggested that we could remove a few that don't generate traffic. Question is, are they getting little traffic because no one is talking about the components they cover, or because everyone is posting to fw-general? If it's the latter then I think we should put more emphasis on people posting to the right list, and make it clear that the general list is *only *for topics not covered elsewhere. One problem I've found is that the mailing lists page does not actually list the exact components covered by each list, leaving someone new to ZF unsure of the best place to post, usually leading to a post in fw-general. I think there is value in keeping separate lists for each area, but we just need to encourage people to post to the right place. We also need to fix the fw-all list, as that may be another reason people only post to the general, mvc and db (in case they don't receive any responses). -- Jack
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
On 17 Dec 2007, at 19:54, Jack Sleight wrote: Gunter Sammet wrote: He just suggested that we could remove a few that don't generate traffic. Question is, are they getting little traffic because no one is talking about the components they cover, or because everyone is posting to fw-general? Duplicate conversation on more than one list annoys me most :) fw-general/fw-mvc and fw-general/fw-db are the most common places for duplicate threads and you have to read both because sometimes someone will trim the "wrong" one... Hence, my personal preference is to either: * remove all lists other that fw-general or * remove fw-general so that everyone has to post to the right list. Regards, Rob...
RE: [fw-general] Project Teams and Separate Mailing Lists. . .
That's a good point, but I think we have to consider the value of the individual lists as well. There are some that aren't going to get much traffic no matter how clear we make it. We should also consider that most projects (that I'm aware of anyways) don't maintain several lists like we do, so many people coming to ZF for the first time are looking for that one-stop list that they're used to in other projects. In the end, we'll always see traffic on general that might fit in a more specific list. The only way to avoid this would be to get rid of general entirely, which I hope we'd all agree is not a particularly good direction to go in. If we had- say- general, db, mvc, auth, and maybe announcements for the people who want to know about releases but not belong to a full-fledged release, I think it would be pretty clear which list to post to for the best results. Plus, if we can figure out how to avoid sending duplicate mails, we could always keep the lists around and just forward the mails appropriately in case we find that we'd like to resurrect one of them later. ,Wil From: Jack Sleight [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 11:55 AM Cc: fw-general@lists.zend.com Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . Gunter Sammet wrote: He just suggested that we could remove a few that don't generate traffic. Question is, are they getting little traffic because no one is talking about the components they cover, or because everyone is posting to fw-general? If it's the latter then I think we should put more emphasis on people posting to the right list, and make it clear that the general list is only for topics not covered elsewhere. One problem I've found is that the mailing lists page does not actually list the exact components covered by each list, leaving someone new to ZF unsure of the best place to post, usually leading to a post in fw-general. I think there is value in keeping separate lists for each area, but we just need to encourage people to post to the right place. We also need to fix the fw-all list, as that may be another reason people only post to the general, mvc and db (in case they don't receive any responses). -- Jack
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
As team leader of the german development team I found it very handy that have a status for the translation members. Which part has to be translated, which was already proof-read, to have a list of members, who is working on what and so on. Now that we have 100% translated for german I don't need it anymore, but I think other language leads could find it very handy. The manual status page is sometimes not enough information. My 2 cents. Thomas I18N and German Team Lead - Original Message - From: "Wil Sinclair" <[EMAIL PROTECTED]> To: "Simone Carletti" <[EMAIL PROTECTED]> Cc: Sent: Monday, December 17, 2007 8:52 PM Subject: RE: [fw-general] Project Teams and Separate Mailing Lists. . . That seems reasonable to me. I don't see any issue with maintaining translation pages in development, but we should make sure we aren't setting ourselves up for getting immediately out of date. As far as I can tell, the areas that go out of date very quickly include the current status of the project, names of people working on the project, etc. And even these wouldn't be an issue if there is a lead maintaining the page, as with the Italian and French pages. So how about this? We can create a standard header for each translation so that all the information that is the same across the translations will appear in the same place, and custom content can go beneath. If no translation lead wants to take ownership of the page, the page will only contain that header, which would include stuff like the language name, a link to the docs on the wiki, and maybe a note that this translation is available for someone to actively lead. All of these pages can go under a new 'translations' page under the documentation guide (http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Documentati on+Guide). If we find that a translation page has gotten out of date, we can archive the custom content and leave the header. Do you find the concept of a 'translation team' useful? If so, what does it bring us? The other project team pages seemed to bring little value and mostly served to list the names of people who said they would help, but were busy when it came to the actual 'helping' part. J ,Wil From: Simone Carletti [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 10:49 AM To: Wil Sinclair Cc: fw-general@lists.zend.com Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . Because translation activity is strictly part of Zend Framework development and improvements, and follows an internal workflow, including an SVN powered storage, I would suggest to think about a translation section under development area. Additionally, I remember I didn't provide much credit to User Space section when I first came across ZF framework, many months ago. I jumped directly to development section. I had a look to user area just a few weeks later, when I started to get involved into ZF development. This is why I think the translation section could find a better place under the development area. If you feel more comfortable it is possible to start with a small set of pages to reduce the number of outdated pages, including howto guidelines and other helpful information. Then each single user (translator) could decide to use custom pages under user area depending on custom needs. What do you think? -- Simone On Dec 17, 2007 7:33 PM, Wil Sinclair < [EMAIL PROTECTED]> wrote: Well, I would call it more of a 'update' than a 'reorganization'. The development space had a bunch of outdated content on it that was generally misleading and gave the wiki a somewhat abandoned feel. While the user space can be more freeform, the development space we use for lots of structured, important content that we'd like to keep as clear and concise as possible. The page you mention happens to be under project teams, which are going away as a concept, although I don't want to take away any tools that are useful for anyone. Would you prefer a new translation section of the development space, or would you rather have the freedom of the user space to do pretty much whatever you want with it? ,Wil Talking about project teams and wiki... I saw you just moved the most part of pages under /archive group that is write protected. It means, for instance, we cannot edit any team or translation page, such as http://framework.zend.com/wiki/display/ARCHIVE/Italian+%28Italiano%29 Is there any wiki reorganization in action? -- Simone wllm wrote: > > Does anybody find the concept of project teams (as laid out here: > http://framework.zend.com/wiki/display/ZFDEV/Project+Teams) worthwhile? > That is to say, not just occasionally useful, but actually worth the > extra effort to maintain and the additional complexity that they add to > the overall project? Most of the project team pages on the wiki are > woefully out of date at this point, and I happen to be very skeptical > about any process or structure that isn't part of any critical
RE: [fw-general] Project Teams and Separate Mailing Lists. . .
OK, then it seems reasonable to leave that up to the discretion of the lead. Teams could appear at the top of the custom content and look pretty much exactly the same as they look on most of the pages now. I think if we attempt to push this concept for all translations, we'll end up out of date for the less active ones. BTW, Thomas, the German translation is a perfect example of a lead taking initiative and really getting the job done. ;) 100%- that's awesome! Unless you guys need them in the next few hours, I'll move them back in to the development tree as proposed after I get home tonight. ,Wil > -Original Message- > From: Thomas Weidner [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 12:47 PM > To: Wil Sinclair; Simone Carletti > Cc: fw-general@lists.zend.com > Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . > > As team leader of the german development team I found it very handy > that > have a status for the translation members. > Which part has to be translated, which was already proof-read, to have > a > list of members, who is working on what and so on. > > Now that we have 100% translated for german I don't need it anymore, > but I > think other language leads could find it very handy. > The manual status page is sometimes not enough information. > > My 2 cents. > > Thomas > I18N and German Team Lead > > > - Original Message - > From: "Wil Sinclair" <[EMAIL PROTECTED]> > To: "Simone Carletti" <[EMAIL PROTECTED]> > Cc: > Sent: Monday, December 17, 2007 8:52 PM > Subject: RE: [fw-general] Project Teams and Separate Mailing Lists. . . > > > That seems reasonable to me. I don't see any issue with maintaining > translation pages in development, but we should make sure we aren't > setting ourselves up for getting immediately out of date. As far as I > can tell, the areas that go out of date very quickly include the > current > status of the project, names of people working on the project, etc. And > even these wouldn't be an issue if there is a lead maintaining the > page, > as with the Italian and French pages. > > So how about this? We can create a standard header for each translation > so that all the information that is the same across the translations > will appear in the same place, and custom content can go beneath. If no > translation lead wants to take ownership of the page, the page will > only > contain that header, which would include stuff like the language name, > a > link to the docs on the wiki, and maybe a note that this translation is > available for someone to actively lead. All of these pages can go under > a new 'translations' page under the documentation guide > (http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Documentat > i > on+Guide). If we find that a translation page has gotten out of date, > we > can archive the custom content and leave the header. > > Do you find the concept of a 'translation team' useful? If so, what > does > it bring us? The other project team pages seemed to bring little value > and mostly served to list the names of people who said they would help, > but were busy when it came to the actual 'helping' part. J > > > > ,Wil > > > > From: Simone Carletti [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 10:49 AM > To: Wil Sinclair > Cc: fw-general@lists.zend.com > Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . . > > > > Because translation activity is strictly part of Zend Framework > development and improvements, and follows an internal workflow, > including an SVN powered storage, I would suggest to think about a > translation section under development area. > > Additionally, I remember I didn't provide much credit to User Space > section when I first came across ZF framework, many months ago. I > jumped > directly to development section. > I had a look to user area just a few weeks later, when I started to get > involved into ZF development. > > This is why I think the translation section could find a better place > under the development area. > If you feel more comfortable it is possible to start with a small set > of > pages to reduce the number of outdated pages, including howto > guidelines > and other helpful information. > Then each single user (translator) could decide to use custom pages > under user area depending on custom needs. > > What do you think? > > -- Simone > > > > On Dec 17, 2007 7:33 PM, Wil Sinclair < [EMAIL PROTECTED]> wrote: > > Well, I would call it more of a 'update' than a 'reorganization'. The > development space had a bunch of outdated content on it that was > generally misleading and gave the wiki a somewhat abandoned feel. While > the user space can be more freeform, the development space we use for > lots of structured, important content that we'd like to keep as clear > and concise as possible. The page you mention happens to be under > project teams, which are going away as a concept, although I do
[fw-general] Default Locale
Greetings, as the fw-i18n list was eliminated without information I am sending new annoucements to fw-general... So please ignore this mail if it's not what you expected to receive :-) --- Greetings, Some of you have expected problems with the automatic detection of Zend_Locale. The reason is that in some environments no locale can be detected. This is especially when * the browser sends no language tag and * the server has set a "default" locale ('C') * or the server uses a properitary locale In this cases you could get an exception telling you that no locale can be detected. Now you can set a "default" locale which will be used as last fallback within every instance. Zend_Locale::setDefault('de'); See the added documentation and http://framework.zend.com/issues/browse/ZF-2300 and http://framework.zend.com/issues/browse/ZF-2310 for details. If you find any problems with this new feature please report them. Greetings Thomas I18N Team Leader
[fw-general] Re: [fw-mvc] Re: [fw-general] Zend_View Enhanced placeholdersready to test
On Dec 17, 2007 7:04 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]> wrote: > -- Whitcraft, Jon <[EMAIL PROTECTED]> wrote > (on Monday, 17 December 2007, 12:52 PM -0500): > > Attached is a diff file fixing the three files that I found the mistake in. > > > > \incubator\documentation\manual\en\module_specs is the folder. > > Applied in r7164. Thanks! > I updated incubator manual at http://nostra.art.pl/Zend/Incubator/ Hope it might help anyone. -- Łukasz Wojciechowski
Re: [fw-general] Project Teams and Separate Mailing Lists. . .
@ Thomas My best congratulations to you and all the German translation team! You've done an excellent job. @ Wil Your proposal sounds good. If you don't want to restore a full translation project directory I would suggest to provide at least a page for each translation with a common header as you suggested before and a centralized page including the basic information about how to start and contribute to a translation. I probably would never started this Italian adventure without this information and I guess other users would abandon the idea without a clear and friendly page about how to get involved into a localized translation. -- Simone On Dec 17, 2007 9:56 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote: > OK, then it seems reasonable to leave that up to the discretion of the > lead. Teams could appear at the top of the custom content and look > pretty much exactly the same as they look on most of the pages now. I > think if we attempt to push this concept for all translations, we'll end > up out of date for the less active ones. > BTW, Thomas, the German translation is a perfect example of a lead > taking initiative and really getting the job done. ;) 100%- that's > awesome! > Unless you guys need them in the next few hours, I'll move them back in > to the development tree as proposed after I get home tonight. > > ,Wil > > > -Original Message- > > From: Thomas Weidner [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 17, 2007 12:47 PM > > To: Wil Sinclair; Simone Carletti > > Cc: fw-general@lists.zend.com > > Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . > . > > > > As team leader of the german development team I found it very handy > > that > > have a status for the translation members. > > Which part has to be translated, which was already proof-read, to have > > a > > list of members, who is working on what and so on. > > > > Now that we have 100% translated for german I don't need it anymore, > > but I > > think other language leads could find it very handy. > > The manual status page is sometimes not enough information. > > > > My 2 cents. > > > > Thomas > > I18N and German Team Lead > > > > > > - Original Message - > > From: "Wil Sinclair" <[EMAIL PROTECTED]> > > To: "Simone Carletti" <[EMAIL PROTECTED]> > > Cc: > > Sent: Monday, December 17, 2007 8:52 PM > > Subject: RE: [fw-general] Project Teams and Separate Mailing Lists. . > . > > > > > > That seems reasonable to me. I don't see any issue with maintaining > > translation pages in development, but we should make sure we aren't > > setting ourselves up for getting immediately out of date. As far as I > > can tell, the areas that go out of date very quickly include the > > current > > status of the project, names of people working on the project, etc. > And > > even these wouldn't be an issue if there is a lead maintaining the > > page, > > as with the Italian and French pages. > > > > So how about this? We can create a standard header for each > translation > > so that all the information that is the same across the translations > > will appear in the same place, and custom content can go beneath. If > no > > translation lead wants to take ownership of the page, the page will > > only > > contain that header, which would include stuff like the language name, > > a > > link to the docs on the wiki, and maybe a note that this translation > is > > available for someone to actively lead. All of these pages can go > under > > a new 'translations' page under the documentation guide > > > (http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Documentat > > i > > on+Guide). If we find that a translation page has gotten out of date, > > we > > can archive the custom content and leave the header. > > > > Do you find the concept of a 'translation team' useful? If so, what > > does > > it bring us? The other project team pages seemed to bring little value > > and mostly served to list the names of people who said they would > help, > > but were busy when it came to the actual 'helping' part. J > > > > > > > > ,Wil > > > > > > > > From: Simone Carletti [mailto:[EMAIL PROTECTED] > > Sent: Monday, December 17, 2007 10:49 AM > > To: Wil Sinclair > > Cc: fw-general@lists.zend.com > > Subject: Re: [fw-general] Project Teams and Separate Mailing Lists. . > . > > > > > > > > Because translation activity is strictly part of Zend Framework > > development and improvements, and follows an internal workflow, > > including an SVN powered storage, I would suggest to think about a > > translation section under development area. > > > > Additionally, I remember I didn't provide much credit to User Space > > section when I first came across ZF framework, many months ago. I > > jumped > > directly to development section. > > I had a look to user area just a few weeks later, when I started to > get > > involved into ZF development. > > > > This is why I think the translation section could find a better place > > under the
RE: [fw-general] Default Locale
The fw-i18n list was not eliminated AFAIK. It's still under discussion, and I will definitely let you know if/when it is eliminated. :) Let me see if there are issues with it. Thanks. ,Wil > -Original Message- > From: Thomas Weidner [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 1:13 PM > To: fw-general@lists.zend.com > Subject: [fw-general] Default Locale > > Greetings, > > as the fw-i18n list was eliminated without information I am sending new > annoucements to fw-general... > So please ignore this mail if it's not what you expected to receive :-) > > --- > > Greetings, > > Some of you have expected problems with the automatic detection of > Zend_Locale. > The reason is that in some environments no locale can be detected. > > This is especially when > * the browser sends no language tag > and > * the server has set a "default" locale ('C') > * or the server uses a properitary locale > > In this cases you could get an exception telling you that no locale can > be > detected. > Now you can set a "default" locale which will be used as last fallback > within every instance. > > Zend_Locale::setDefault('de'); > > See the added documentation and > http://framework.zend.com/issues/browse/ZF-2300 and > http://framework.zend.com/issues/browse/ZF-2310 > for details. > > If you find any problems with this new feature please report them. > > Greetings > Thomas > I18N Team Leader >
RE: [fw-general] Default Locale
I just sent a message through without a hitch. Can you try again, please? ,Wil > -Original Message- > From: Thomas Weidner [mailto:[EMAIL PROTECTED] > Sent: Monday, December 17, 2007 1:13 PM > To: fw-general@lists.zend.com > Subject: [fw-general] Default Locale > > Greetings, > > as the fw-i18n list was eliminated without information I am sending new > annoucements to fw-general... > So please ignore this mail if it's not what you expected to receive :-) > > --- > > Greetings, > > Some of you have expected problems with the automatic detection of > Zend_Locale. > The reason is that in some environments no locale can be detected. > > This is especially when > * the browser sends no language tag > and > * the server has set a "default" locale ('C') > * or the server uses a properitary locale > > In this cases you could get an exception telling you that no locale can > be > detected. > Now you can set a "default" locale which will be used as last fallback > within every instance. > > Zend_Locale::setDefault('de'); > > See the added documentation and > http://framework.zend.com/issues/browse/ZF-2300 and > http://framework.zend.com/issues/browse/ZF-2310 > for details. > > If you find any problems with this new feature please report them. > > Greetings > Thomas > I18N Team Leader >
[fw-general] Centering?
The centering on this forum is a bit distracting. -- View this message in context: http://www.nabble.com/Centering--tp14375831s16154p14375831.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] HeadScript
This view helper should fix it: class My_View_Helper_HeadScript extends Zend_View_Helper_HeadScript { private $_scripts = array(); public function appendFile($path) { if (!in_array($path,$this->_scripts)) { array_push($this->_scripts, $path); parent::__call('appendFile',array($path)); } } } -- View this message in context: http://www.nabble.com/HeadScript-tp14322216s16154p14375832.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] capture exception
if i call a not exist method or action, ZF going to fire a exception. i have read tutorial about set up ErrorController class to capture those kind of exception, but was not working, the ErrorController class did not capture any exception. i do not why , I have followed instruction, and my ErrorController is under my application controller directory. then i have looked source code, and found that ErrorController be called in postDispatch, but that non method/action exception actually fired before postDispath. in dispatch method of Front.php , following code fire non method/action exist exception. try { $dispatcher->dispatch($this->_request, $this->_response); } catch (Exception $e) { if ($this->throwExceptions()) { throw $e; } $this->_response->setException($e); }. so my question is how to trap exception that fired by $dispatcher->dispatch($this->_request, $this->_response); I do not want to do like try { $frontController->dispatch(); } catch { } i want do some thing like set up a ErrorController class to trap exception. regards. -- View this message in context: http://www.nabble.com/capture-exception-tp14375842s16154p14375842.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Unit testing action controllers
look at test directory of zendframe source code. by the way , why not put all those code into your model? i mean developing your own model, so when do unit testing, just testing those model. controller is just a place to call model and view, testing controller pretty much make no sense. unless your are author of ZF. regards. Don Dwiggins-2 wrote: > > Hello, I've just subscribed to the group, and am fairly new to PHP and > ZF (although I have a long history in software development on various > platforms). > > I'm in the middle of setting myself up to do TDD on a ZF-based app. > I've got Model testing in pretty good shape, but I've found myself a bit > stalled on testing my action controllers, and haven't found much via > Googling. > > I've come up with an approach that I think will work, but I thought I'd > run it by the knowledgeable folks here first. Also, my apologies if > there's a better place to post this -- redirection gratefully accepted. > > Here's my analysis of the situation (I'm using Smarty, but this could > apply to other rendering engines): > > The basic task of an action controller's action method (generic, > simplistic): > - Validate its inputs, if any (top-level, context-free validation) >- If any invalid, render an appropriate page with a helpful error > message >- Instantiate the model, pass inputs to the appropriate method, get > the result of the method >- If invalid, render an appropriate page with a helpful error message >- If valid, set view variables and render the appropriate page > (Note that all 3 "render" actions have the same form: set some variables > and render a template. I'd guess that this could be extended in the > same vein for more sophisticated rendering situations.) > > For unit testing, we don't really want to deal with the results of > rendering; we're testing the controller, not the view, and certainly not > the rendering engine. What we really want is to test the logic as > outlined above. > > Thus, here's a pattern for a "testable action method": > - For each action, pull out the "guts" into a separate method, which > returns a pair (template name, array of view variables) > - The action method just calls the guts method, sets the variables into > the view, and renders the template > - This allows a unit test to just call the guts method and make > assertions on the returned template and variables. > > Any good words appreciated, > -- > Don Dwiggins > Advanced Publishing Technology > > > -- View this message in context: http://www.nabble.com/Unit-testing-action-controllers-tp14287475s16154p14375846.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] catch sql statement execute error
do not know how to do inside zf or drupal, but can you set up error log for you DB? most DBs have error log option, check out your DB manual. regards. Kexiao Liao wrote: > > Is there a good way to catch the sql statement execute error message when > it is been fired? > > For example when I run the following two statements, how can I catch the > error message if it happens during the running process? > > $stmtNode = $dbDrupal-> query("UPDATE node set title='" . $newName . "' > WHERE nid='" . $forum . "'"); > $stmtNode->execute(); > -- View this message in context: http://www.nabble.com/catch-sql-statement-execute-error-tp14372542s16154p14375848.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Get sql results in my Model (Zend_Db_Table)
looking at ZF manual, the manaul showed many ways to get sql result. regards. debussy007 wrote: > > Hello, > > In my web application I simply want to get the bookmarked articles of a > user : > > select * from articles G, selections S > where G.id_art = S.art_id > and S.member_id = 2 > and G.to_delete = 0; > > I want to get the result in my model object which extends Zend db table, > "Article" > (And I don't need the returned selections data of the query) > > What is the usual way to do such a thing ? > > Thank you ! > -- View this message in context: http://www.nabble.com/Get-sql-results-in-my-Model-%28Zend_Db_Table%29-tp14370287s16154p14375849.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZVE: HeadStyle output
Hi Matthew/all, Sorry for the irregular emails! I've just started playing with the HeadStyle helper and had some quick Q's for yourself and the list:- Escaping The Helper escapes XHTML by using the meta string, however without that appropriate /* */ wrapper, my browser (Safari) throws a wobbly. Would it be more appropriate to assume the /* [CDATA[ */ prefix and /* ]]> */ suffix as default? Multiple definitions If I add styles atomically:- headStyle()->appendStyle('#heading1 { background-image: url(/ img/heading/member-foo.png) }') ?> headStyle()->appendStyle('#heading2 { background-image: url(/ img/heading/member-bar.png) }') ?> headStyle()->appendStyle('#heading3 { background-image: url(/ img/heading/member-other.png) }') ?> ...the output shows something like this:- Would it not be better to iterate through all the style items and then provide the tag as a wrapper to this? Or did you intend for potentially more than 1 style declaration per document? What would be the appropriate syntax for combining these 1-by-1?Default attributesWould media set to 'screen' be the best default (being the most likely of the targets for a website) - obviously print pages, etc, can be handled on a per-page basis....so ultimately I'd like to do this:- View:-$this->headStyle()->appendStyle('#heading1 { background-image: url(/ img/heading/member-foo.png) }') ?> $this->headStyle()->appendStyle('#heading2 { background-image: url(/ img/heading/member-bar.png) }') ?> $this->headStyle()->appendStyle('#heading3 { background-image: url(/ img/heading/member-other.png) }') ?>Layout:- = $this->headStyle() ?> ...and get this:-