[fw-general] Pagination with routes not working.
Hi all. I'm having a bit of a problem trying to get the pagination working using a route. It is not printing the page numbers in the a href of the urls. so it just goes to wedding/bouquets/category instead of wedding/bouquets/category/2 etc The pagination shows, but I do not get the correct links. they just point to the base page. And when i go to wedding/bouquets/category/2 etc if shows the correct page too. So all is working except the links, which show, but don't function correctly. Also is it possible to link the number 1 link back so it doesnt have the 1 there. ie the base page? wedding/bouquets/category and have page 2 go to wedding/bouquets/category/2 etc in my bootstrap i have these routes set already $route = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); $router-addRoute('bouquet',$route2); $route3 = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet/:page', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); in the wedding controller, bouquet action i have the following $bouquet = new Bouquet(); if ($category_id 0) { $obj = $bouquet-fetchAll('bouquet_category='.$category_id); $array = $obj-toArray(); $this-view-paginator = Zend_Paginator::factory($array); $this-view-paginator-setCurrentPageNumber($this-_getParam('page')); $this-view-bouquet = $bouquet-fetchAll('bouquet_category='.$category_id); return; } then in my view i have ?php if (count($this-paginator)): ??= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ul ?php echo $this-partialLoop('partials/_bouquets.phtml', $this-paginator); ? /ul ?= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ?php endif; ? and the my_pagination_control.phtml looks like this ?php if ($this-pageCount): ? div class=paginationControl !-- Previous page link -- ?php if (isset($this-previous)): ? ?= $this- url(array('page' = $this-previous)); ? lt; Previous | ?php else: ? lt; Previous | ?php endif; ? !-- Numbered page links -- ?php foreach ($this-pagesInRange as $page): ? ?php if ($page != $this-current): ? ?= $this- url(array('page' = $page)); ? ?= $page; ? | ?php else: ? ?= $page; ? | ?php endif; ? ?php endforeach; ? !-- Next page link -- ?php if (isset($this-next)): ? ?= $this- url(array('page' = $this-next)); ? Next gt; ?php else: ? Next gt; ?php endif; ? /div ?php endif; ? thanks for any help given. It is always much appreciated. -- View this message in context: http://www.nabble.com/Pagination-with-routes-not-working.-tp20657017p20657017.html Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Zend_Feed Error
Hi, I can't duplicate the problem on my ZF 1.7 environment. The only thing I am doing different is assigning the results to a variable rather than the view E.g. try { $rss = Zend_Feed::import('http://feedproxy.google.com/francaistechcrunch'); } catch (Zend_Feed_Exception $e) { exit(strongException caught importing feed:/strongbr / . $e-getMessage()); } -Original Message- From: Maxime P [mailto:[EMAIL PROTECTED] Sent: 23 November 2008 10:04 To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend_Feed Error Help me please! Maxime P wrote: Hi Everybody! I have a problem on Zend_Feed. When i do that it returns me an exception Invalid chunk size ... unable to read chunked body There my code: try { $this-view-flux = Zend_Feed::import('http://feedproxy.google.com/francaistechcrunch'); } catch (Exception $e) { echo Une exception a été interceptée lors de l'importation du flux: {$e-getMessage()}\n; exit; } I don't understand this error. Can you help me? Thanks in advance! -- View this message in context: http://www.nabble.com/Zend_Feed-Error-tp20622594p20644647.html Sent from the Zend Framework mailing list archive at Nabble.com. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
Re: [fw-general] Pagination with routes not working.
Hi, Have you tried: $route = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet', array( 'controller' = 'wedding', 'action' = 'bouquet', 'page' = 1 ) ); So this makes page default to 1 if not set. You may also want to be careful with this part: $obj = $bouquet-fetchAll('bouquet_category='.$category_id); $array = $obj-toArray(); This is fine if there are only ever a small amount of rows, if you try this with large result sets you will eat memory. You are much better to limit your query. To do this you can use the tableSelectAdpater. Hope this helps Keith 2008/11/24 Ace Paul [EMAIL PROTECTED]: Hi all. I'm having a bit of a problem trying to get the pagination working using a route. It is not printing the page numbers in the a href of the urls. so it just goes to wedding/bouquets/category instead of wedding/bouquets/category/2 etc The pagination shows, but I do not get the correct links. they just point to the base page. And when i go to wedding/bouquets/category/2 etc if shows the correct page too. So all is working except the links, which show, but don't function correctly. Also is it possible to link the number 1 link back so it doesnt have the 1 there. ie the base page? wedding/bouquets/category and have page 2 go to wedding/bouquets/category/2 etc in my bootstrap i have these routes set already $route = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); $router-addRoute('bouquet',$route2); $route3 = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet/:page', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); in the wedding controller, bouquet action i have the following $bouquet = new Bouquet(); if ($category_id 0) { $obj = $bouquet-fetchAll('bouquet_category='.$category_id); $array = $obj-toArray(); $this-view-paginator = Zend_Paginator::factory($array); $this-view-paginator-setCurrentPageNumber($this-_getParam('page')); $this-view-bouquet = $bouquet-fetchAll('bouquet_category='.$category_id); return; } then in my view i have ?php if (count($this-paginator)): ??= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ul ?php echo $this-partialLoop('partials/_bouquets.phtml', $this-paginator); ? /ul ?= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ?php endif; ? and the my_pagination_control.phtml looks like this ?php if ($this-pageCount): ? div class=paginationControl !-- Previous page link -- ?php if (isset($this-previous)): ? ?= $this- url(array('page' = $this-previous)); ? lt; Previous | ?php else: ? lt; Previous | ?php endif; ? !-- Numbered page links -- ?php foreach ($this-pagesInRange as $page): ? ?php if ($page != $this-current): ? ?= $this- url(array('page' = $page)); ? ?= $page; ? | ?php else: ? ?= $page; ? | ?php endif; ? ?php endforeach; ? !-- Next page link -- ?php if (isset($this-next)): ? ?= $this- url(array('page' = $this-next)); ? Next gt; ?php else: ? Next gt; ?php endif; ? /div ?php endif; ? thanks for any help given. It is always much appreciated. -- View this message in context: http://www.nabble.com/Pagination-with-routes-not-working.-tp20657017p20657017.html Sent from the Zend Framework mailing list archive at Nabble.com. -- -- [MuTe] --
Re: [fw-general] Pagination with routes not working.
thanks for the quick response Keith. I gave that one a go, but no luck unfortunately. Will look into the tableSelectAdapter also. Still very new to ZF so taking baby steps at the moment. thanks for your help -- View this message in context: http://www.nabble.com/Pagination-with-routes-not-working.-tp20657017p20658202.html Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] Zend_Feed Error
It 's wired! I'm going to check the php.ini and httpd.conf... Thks, rcastley wrote: Hi, I can't duplicate the problem on my ZF 1.7 environment. The only thing I am doing different is assigning the results to a variable rather than the view E.g. try { $rss = Zend_Feed::import('http://feedproxy.google.com/francaistechcrunch'); } catch (Zend_Feed_Exception $e) { exit(strongException caught importing feed:/strongbr / . $e-getMessage()); } -Original Message- From: Maxime P [mailto:[EMAIL PROTECTED] Sent: 23 November 2008 10:04 To: fw-general@lists.zend.com Subject: Re: [fw-general] Zend_Feed Error Help me please! Maxime P wrote: Hi Everybody! I have a problem on Zend_Feed. When i do that it returns me an exception Invalid chunk size ... unable to read chunked body There my code: try { $this-view-flux = Zend_Feed::import('http://feedproxy.google.com/francaistechcrunch'); } catch (Exception $e) { echo Une exception a été interceptée lors de l'importation du flux: {$e-getMessage()}\n; exit; } I don't understand this error. Can you help me? Thanks in advance! -- View this message in context: http://www.nabble.com/Zend_Feed-Error-tp20622594p20644647.html Sent from the Zend Framework mailing list archive at Nabble.com. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. -- View this message in context: http://www.nabble.com/Zend_Feed-Error-tp20622594p20658627.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] PHPUnit and ZF
Hello I'm using PHPUnit to test my models in ZF and came across a bit of an issue with it on Friday. So I have a Rowclass designated for a particular table class. Inside this row class I had made a syntax error that I didn't see and it did something weird to my test suite. Below is the output of PHPUnit for this particular test, first of all with the offending Rowclass commented out C:\svn\framework-dev\html\testsphpunit models\AssociationTest.php PHPUnit 3.3.3 by Sebastian Bergmann. .I..I Time: 1 second OK, but incomplete or skipped tests! Tests: 5, Assertions: 7, Incomplete: 2. And now with the offending code back in. C:\svn\framework-dev\html\testsphpunit models\AssociationTest.php PHPUnit 3.3.3 by Sebastian Bergmann. No errors, no tests.. nothing. Now I'm not sure if this is the fault of PHP, ZF or PHPUnit but it took me half a day to find it. As a warning any other coder that if this is happening to you you should check to see if you have a syntax error in your code somewhere. If anyone has an idea as to how this behaviour may be improved drop me a line, I'm going to alert the owner of PHPUnit to this as well if at all possible but I think it's a ZF issue. Zend_Loader::loadClass not exceptioning on a badly included rowClass perhaps? - Chris aka CatJelly on #zftalk -- View this message in context: http://www.nabble.com/PHPUnit-and-ZF-tp20658721p20658721.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Soap_Wsdl: nested objects possible?
Is it possible to create nested objects with Zend_Soap_Wsdl to use for WSDL generation? I tried someting like this: --- SNIP --- class MyFooResult { /** * @var MyFooSubResult[] */ public $sub; /* ... */ } --- SNAP --- ...but I am getting an Zend_Soap_Wsdl_Exception with following message: Cannot add a complex type MyFooSubResult[] that is not an object or where class could not be found in 'DefaultComplexType' strategy. This exception will be caused because Zend_Soap_Wsdl_Strategy_DefaultComplexType is used for class properties and it searchs for a class named MyFooSubResult[]. Am I doing something wrong or is it impossible (at the moment?) to use nested objects for WSDL generation? -- Jan -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Re: [fw-general] Zend_Soap_Wsdl: nested objects possible?
My first parameter for Zend_Soap_AutoDiscover is an instance of Zend_Soap_Wsdl_Strategy_ArrayOfTypeComplex. But it seems that it will only be used for top-level classes. Not for its properties. Original-Nachricht Datum: Mon, 24 Nov 2008 13:32:21 +0100 Von: Benjamin Eberlei [EMAIL PROTECTED] An: Jan Pieper [EMAIL PROTECTED] Betreff: Re: [fw-general] Zend_Soap_Wsdl: nested objects possible? it is possible: http://framework.zend.com/manual/en/zend.soap.wsdl.html#zend.soap.wsdl.types.add_complex you have to use Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence strategy for detection. On Mon, 24 Nov 2008 13:13:27 +0100, Jan Pieper [EMAIL PROTECTED] wrote: Is it possible to create nested objects with Zend_Soap_Wsdl to use for WSDL generation? I tried someting like this: --- SNIP --- class MyFooResult { /** * @var MyFooSubResult[] */ public $sub; /* ... */ } --- SNAP --- ...but I am getting an Zend_Soap_Wsdl_Exception with following message: Cannot add a complex type MyFooSubResult[] that is not an object or where class could not be found in 'DefaultComplexType' strategy. This exception will be caused because Zend_Soap_Wsdl_Strategy_DefaultComplexType is used for class properties and it searchs for a class named MyFooSubResult[]. Am I doing something wrong or is it impossible (at the moment?) to use nested objects for WSDL generation? -- Jan -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger -- Sensationsangebot nur bis 30.11: GMX FreeDSL - Telefonanschluss + DSL für nur 16,37 Euro/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
[fw-general] Size Validator Zend 1.7.0 - bytestring problem
In Zend framework 1.7.0 the file size validator doesn't work as in 1.6.2. The conversion of the Byte length to String doesn't take place in the validation message. In the setMin and setMax method a conversion from _fromByteString take place. Then in the isValid method the converted _toByteString of min and max gets still the result of the integer, becaurse the conversion of the setMin, setMax will be executed again. this is also valid for the _setSize method I just wanted leave this as note. -- View this message in context: http://www.nabble.com/Size-Validator-Zend-1.7.0---bytestring-problem-tp20661071p20661071.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Size Validator Zend 1.7.0 - bytestring problem
This issue has already been told a few days ago and fixed in trunk. You see, we're quicker than your mail ;-))) Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Nick17 [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Monday, November 24, 2008 2:43 PM Subject: [fw-general] Size Validator Zend 1.7.0 - bytestring problem In Zend framework 1.7.0 the file size validator doesn't work as in 1.6.2. The conversion of the Byte length to String doesn't take place in the validation message. In the setMin and setMax method a conversion from _fromByteString take place. Then in the isValid method the converted _toByteString of min and max gets still the result of the integer, becaurse the conversion of the setMin, setMax will be executed again. this is also valid for the _setSize method I just wanted leave this as note. -- View this message in context: http://www.nabble.com/Size-Validator-Zend-1.7.0---bytestring-problem-tp20661071p20661071.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Pagination with routes not working.
Hey Ace, i had the same problem. I solved it by making a link which leading me to the page with pagination like this before: wedding/bouquets/category (above wasnt work for me) and this one works: wedding/bouquets/category/1 //in bootstrap $route3 = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet/:page', array( 'controller' = 'wedding', 'action' = 'bouquet' ) // $obj = $bouquet-fetchAll('bouquet_category='.$category_id); //in controller $db = Zend_Registry::get ( 'db' ); $select = $db-select () -from ( 'bouqets', array ('*' ) ) -where ( 'bouquet_category= ?', $category_id ); // Instantiate the Zend Paginator and give it the Zend_Db_Select instance Argument ($selection) $paginator = Zend_Paginator::factory($select); // Set parameters for paginator $paginator-setCurrentPageNumber($this-_getParam(page)); // Note: For this to work of course, your URL must be something like this: http: //localhost:/index/index/page/1 - meaning we are currently on page one, and pass that value into the setCurrentPageNumber $paginator-setItemCountPerPage(3); $paginator-setPageRange(5); //$paginator-setCurrentPageNumber(2); // Make paginator available in your views $this-view-paginator = $paginator; Ace Paul wrote: Hi all. I'm having a bit of a problem trying to get the pagination working using a route. It is not printing the page numbers in the a href of the urls. so it just goes to wedding/bouquets/category instead of wedding/bouquets/category/2 etc The pagination shows, but I do not get the correct links. they just point to the base page. And when i go to wedding/bouquets/category/2 etc if shows the correct page too. So all is working except the links, which show, but don't function correctly. Also is it possible to link the number 1 link back so it doesnt have the 1 there. ie the base page? wedding/bouquets/category and have page 2 go to wedding/bouquets/category/2 etc in my bootstrap i have these routes set already $route = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); $router-addRoute('bouquet',$route2); $route3 = new Zend_Controller_Router_Route( 'wedding/bouquets/:bouquet/:page', array( 'controller' = 'wedding', 'action' = 'bouquet' ) ); in the wedding controller, bouquet action i have the following $bouquet = new Bouquet(); if ($category_id 0) { $obj = $bouquet-fetchAll('bouquet_category='.$category_id); $array = $obj-toArray(); $this-view-paginator = Zend_Paginator::factory($array); $this-view-paginator-setCurrentPageNumber($this-_getParam('page')); $this-view-bouquet = $bouquet-fetchAll('bouquet_category='.$category_id); return; } then in my view i have ?php if (count($this-paginator)): ??= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ul ?php echo $this-partialLoop('partials/_bouquets.phtml', $this-paginator); ? /ul ?= $this-paginationControl($this-paginator, 'Sliding', 'my_pagination_control.phtml'); ? ?php endif; ? and the my_pagination_control.phtml looks like this ?php if ($this-pageCount): ? div class=paginationControl !-- Previous page link -- ?php if (isset($this-previous)): ? ?= $this- url(array('page' = $this-previous)); ? lt; Previous | ?php else: ? lt; Previous | ?php endif; ? !-- Numbered page links -- ?php foreach ($this-pagesInRange as $page): ? ?php if ($page != $this-current): ? ?= $this- url(array('page' = $page)); ? ?= $page; ? | ?php else: ? ?= $page; ? | ?php endif; ? ?php endforeach; ? !-- Next page link -- ?php if (isset($this-next)): ? ?= $this- url(array('page' = $this-next)); ? Next gt; ?php else: ? Next gt; ?php endif; ? /div ?php endif; ? thanks for any help given. It is always much appreciated. -- View this message in context: http://www.nabble.com/Pagination-with-routes-not-working.-tp20657017p20661726.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend_Uri_Http OR Zend_Validate_Hostname BUG
Hello, I try to pass a local http uri (http://my.prj.lh;) to Zend_Uri, but it brings me an exception Invalid URI supplied. I can see in Zend_Http_Uri file, that it tries to validate with constant ALLOW_ALL code snippet: $validate = new Zend_Validate_Hostname(Zend_Validate_Hostname::ALLOW_ALL); but in the Zend_Validate_Hostname there is no place where it would check for this constant. At least I cant understand the logic... My question is, should validating my local address work? Or is it a BUG and it will be fixed? -- Pagarbiai, Vladas Diržys Tel.: +370 620 69020 www.dirzys.com
[fw-general] Fwd: Dijit Textarea functionality
Hi, I am aware that this element (Dijit Textarea) grows vertically when text is added, after only specifying a width for the element. My observation is that if you don't include a space when typing in the textarea, on the first 'line' the textarea will not grow vertically and continue to grow horizontally indefinitely (as long as you press the key down). Is this the correct behaviour and is there a setting I can change to stop this from happening? OK, I know users may not do this but if there is a way to make it wrap without relying on a space being typed I would very much like to know. -- Thank You Daniel Latter -- Thank You Daniel Latter
[fw-general] Dijit Textarea functionality
Hi, I am aware that this element (Dijit Textarea) grows vertically when text is added, after only specifying a width for the element. My observation is that if you don't include a space when typing in the textarea, on the first 'line' the textarea will not grow vertically and continue to grow horizontally indefinitely (as long as you press the key down). Is this the correct behaviour and is there a setting I can change to stop this from happening? OK, I know users may not do this but if there is a way to make it wrap without relying on a space being typed I would very much like to know. -- Thank You Daniel Latter
Re: [fw-general] .phtml and .phtml(xforms)
Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ thank you very much! -- View this message in context: http://www.nabble.com/.phtml-and-.phtml%28xforms%29-tp20653857p20661911.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] .phtml and .phtml(xforms)
thank you very much! Matthew Weier O'Phinney-3 wrote: -- nolnor [EMAIL PROTECTED] wrote (on Sunday, 23 November 2008, 06:26 PM -0800): -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/ -- View this message in context: http://www.nabble.com/.phtml-and-.phtml%28xforms%29-tp20653857p20661966.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] PHPUnit and ZF
-- CatharsisJelly [EMAIL PROTECTED] wrote (on Monday, 24 November 2008, 03:06 AM -0800): I'm using PHPUnit to test my models in ZF and came across a bit of an issue with it on Friday. So I have a Rowclass designated for a particular table class. Inside this row class I had made a syntax error that I didn't see and it did something weird to my test suite. Below is the output of PHPUnit for this particular test, first of all with the offending Rowclass commented out C:\svn\framework-dev\html\testsphpunit models\AssociationTest.php PHPUnit 3.3.3 by Sebastian Bergmann. .I..I Time: 1 second OK, but incomplete or skipped tests! Tests: 5, Assertions: 7, Incomplete: 2. And now with the offending code back in. C:\svn\framework-dev\html\testsphpunit models\AssociationTest.php PHPUnit 3.3.3 by Sebastian Bergmann. No errors, no tests.. nothing. Now I'm not sure if this is the fault of PHP, ZF or PHPUnit but it took me half a day to find it. As a warning any other coder that if this is happening to you you should check to see if you have a syntax error in your code somewhere. If anyone has an idea as to how this behaviour may be improved drop me a line, I'm going to alert the owner of PHPUnit to this as well if at all possible but I think it's a ZF issue. Zend_Loader::loadClass not exceptioning on a badly included rowClass perhaps? A couple things to note. First, when testing, make sure that error_reporting is set to E_ALL|E_STRICT (8191), and that display_errors is on; disabling errors when testing is a good way to waste a lot of time. Second, I've occasionally had issues with PHP segfaulting during testing... and in such cases, there's little you can do except to begin commenting out tests until you find the offending one. Third, Zend_Loader::loadClass() will throw an exception if the requested class or interface was not loaded. Again, if display_errors is on and you have an appropriate error_reporting setting, you'll see this. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
RE: [fw-general] Zend_Feed Error
It seems that the problem come from Zend_http_client -- View this message in context: http://www.nabble.com/Zend_Feed-Error-tp20622594p20662128.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Dijit Textarea functionality
-- Daniel Latter [EMAIL PROTECTED] wrote (on Monday, 24 November 2008, 02:23 PM +): I am aware that this element (Dijit Textarea) grows vertically when text is added, after only specifying a width for the element. My observation is that if you don't include a space when typing in the textarea, on the first 'line' the textarea will not grow vertically and continue to grow horizontally indefinitely (as long as you press the key down). Is this the correct behaviour and is there a setting I can change to stop this from happening? OK, I know users may not do this but if there is a way to make it wrap without relying on a space being typed I would very much like to know. This would actually be better asked on one of the Dojo mailing lists. -- Matthew Weier O'Phinney Software Architect | [EMAIL PROTECTED] Zend Framework | http://framework.zend.com/
Re: [fw-general] PHPUnit and ZF
Thanks for the comment Matthew, I'm using an example from your site in fact ffor test, the TestHelper that gets included with every test. Matthew Weier O'Phinney-3 wrote: A couple things to note. First, when testing, make sure that error_reporting is set to E_ALL|E_STRICT (8191), and that display_errors is on; disabling errors when testing is a good way to waste a lot of time. Current settings in that TestHelper file are: error_reporting( E_ALL | E_STRICT ); ini_set('display_errors', 1); Matthew Weier O'Phinney-3 wrote: Second, I've occasionally had issues with PHP segfaulting during testing... and in such cases, there's little you can do except to begin commenting out tests until you find the offending one. Third, Zend_Loader::loadClass() will throw an exception if the requested class or interface was not loaded. Again, if display_errors is on and you have an appropriate error_reporting setting, you'll see this. Same issue, I'm going to try and see if xdebug helps a bit later but it made my Windows machine freak out completley so I'll try it when I get home. More details as and when I get them :) -- View this message in context: http://www.nabble.com/PHPUnit-and-ZF-tp20658721p20662308.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Dijit Textarea functionality
On Monday 24 November 2008 15:23:34 Daniel Latter wrote: Hi, I am aware that this element (Dijit Textarea) grows vertically when text is added, after only specifying a width for the element. My observation is that if you don't include a space when typing in the textarea, on the first 'line' the textarea will not grow vertically and continue to grow horizontally indefinitely (as long as you press the key down). Is this the correct behaviour and is there a setting I can change to stop this from happening? OK, I know users may not do this but if there is a way to make it wrap without relying on a space being typed I would very much like to know. There was an entry in the dojo bug tracker about this, unfortunately it was marked as resolved some time ago but iirc the resolution was just to add some conditional checking for safari. This appears to be an issue with firefox and possibly safari, if a dijit textarea is wrapped in an li or dd tag (and possibly others) then the auto-expand functionality is broken. As a work around... if you tweak the decorators to wrap the elements in a div tag the textarea dijit should behave more consistently. Graham
[fw-general] Zend_Acl howto know isAllowed is false due to assert fail?
Hi, Lets say I have this snippet some code already for creating acl object $acl-allow('baby','house','break',$hadMilk); So how do I know i $isAllowed = $acl-isAllowed('baby','house','break'); // so if $isAllowed === falsehow do I know this is due to $hadMilk assert is false or just no such allow rule there?
Re: [fw-general] Dijit Textarea functionality
Hi Graham, Thanks for the reply. Im new to ZF and have added the following line as you suggested, this is what I now have: $this-addElement( 'Textarea', 'message', array( 'label' = 'Message * (will grow automatically)', 'required' = true, 'style'= 'width: 200px' ) )-addDecorator('HtmlTag', array('tag' = 'div')); But this just wraps the whole form in a div tag, I guess I need to remove/overwrite the default decorator? Would be grateful of any help Thanks 2008/11/24 Graham Anderson [EMAIL PROTECTED] On Monday 24 November 2008 15:23:34 Daniel Latter wrote: Hi, I am aware that this element (Dijit Textarea) grows vertically when text is added, after only specifying a width for the element. My observation is that if you don't include a space when typing in the textarea, on the first 'line' the textarea will not grow vertically and continue to grow horizontally indefinitely (as long as you press the key down). Is this the correct behaviour and is there a setting I can change to stop this from happening? OK, I know users may not do this but if there is a way to make it wrap without relying on a space being typed I would very much like to know. There was an entry in the dojo bug tracker about this, unfortunately it was marked as resolved some time ago but iirc the resolution was just to add some conditional checking for safari. This appears to be an issue with firefox and possibly safari, if a dijit textarea is wrapped in an li or dd tag (and possibly others) then the auto-expand functionality is broken. As a work around... if you tweak the decorators to wrap the elements in a div tag the textarea dijit should behave more consistently. Graham -- Thank You Daniel Latter
Re: [fw-general] Dijit Textarea functionality
On Monday 24 November 2008 17:01:46 you wrote: Hi Graham, Thanks for the reply. Im new to ZF and have added the following line as you suggested, this is what I now have: $this-addElement( 'Textarea', 'message', array( 'label' = 'Message * (will grow automatically)', 'required' = true, 'style'= 'width: 200px' ) )-addDecorator('HtmlTag', array('tag' = 'div')); But this just wraps the whole form in a div tag, I guess I need to remove/overwrite the default decorator? Would be grateful of any help I'm not quite sure why it wraps the whole form using the method above, but this should work on the single textarea element. $this-addElement('Textarea', 'message', array( 'label' = 'Message * (will grow automatically)', 'required' = true, 'style'= 'width: 200px' ) ); $this-getElement('message') -getDecorator('HtmlTag') -setOption('tag', 'div'); Graham
[fw-general] Re: Zend_Acl howto know isAllowed is false due to assert fail?
Julian Davchev wrote: Hi, Lets say I have this snippet some code already for creating acl object $acl-allow('baby','house','break',$hadMilk); So how do I know i $isAllowed = $acl-isAllowed('baby','house','break'); // so if $isAllowed === falsehow do I know this is due to $hadMilk assert is false or just no such allow rule there? I think a question I would ask is why do you need to know this? Abstraction is good! Zend_ACL is a system that allows this abstraction. If you want to know the reasons why your ACL fails, then just check each condition manually and don't use the Zend_ACL system at all! I guess you could throw an exception or set something in a registry in your assert method if you really want to bubble this info up to the calling code, but I'd think seriously about the reasons behind doing this before going down this route. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mandriva Linux Contributor [http://www.mandriva.com/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
[fw-general] New To PHP Zend
Hi All Am new to php/mysql and am looking to use Zend Framework as the backbone of my introduction into such application design, for the purposes of building dynamic web sites. I have made myself sufficiently familair with HTML as the first part of my learning and now wish to step up to building data driven web applications. Have fore-armed myself with several books for reference, but feel that at my advanced years and lack of technical nous...the best method for accelerated learning is to use the above, in a by rote manner.almost like building a jigsaw, which I can examine by seeing completed and working code. Could someone kindly offer a start point? thanks Mike -- View this message in context: http://www.nabble.com/New-To-PHP---Zend-tp20664844p20664844.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Dijit Textarea functionality
Hi Graham, Indeed, your version worked, not shure why mine did not, anyhow it still doesnt solve the problem with in the cases where there are no spaces in the text to make the textarea drop down to the next line. I posted the same q on the Dijit mailing list, fyi, heres the response: We are dealing with this on a current project with a widget that extends dijit.textarea. In our case, the layout doesn't break, it just stretches. We are trying to argue that's good enough. Possible workarounds: Use CSS to hide the over-long textarea with overflow:hidden. We attempted this, but it didn't work because our CSS is so complex (rounded corners supported by IE6 - ugh). Capture the onkeypress, which fires an event on every character. Then use a RegExp or some other method to check between spaces of the text for overly-long words (you might do: dojo.forEach( widget.attr(value).split( ), function(str){ if(str.length TOOLONG) ... } ...then insert a intermittent spaces, line breaks, or a wbr/. You could also do a dojo.stopEvent(evt) at some point. This is obviously going to be processor intensive. Maybe you could get fancy and just capture the amount of keypresses in between keyup/keydowns, and you'd know that someone is holding down a key. Also check that the character is a letter and not some sort of punctuation that may be legit, like a series of periods. I just thought of that last one. I might try it myself :) Thanks 2008/11/24 Graham Anderson [EMAIL PROTECTED]: On Monday 24 November 2008 17:01:46 you wrote: Hi Graham, Thanks for the reply. Im new to ZF and have added the following line as you suggested, this is what I now have: $this-addElement( 'Textarea', 'message', array( 'label' = 'Message * (will grow automatically)', 'required' = true, 'style'= 'width: 200px' ) )-addDecorator('HtmlTag', array('tag' = 'div')); But this just wraps the whole form in a div tag, I guess I need to remove/overwrite the default decorator? Would be grateful of any help I'm not quite sure why it wraps the whole form using the method above, but this should work on the single textarea element. $this-addElement('Textarea', 'message', array( 'label' = 'Message * (will grow automatically)', 'required' = true, 'style'= 'width: 200px' ) ); $this-getElement('message') -getDecorator('HtmlTag') -setOption('tag', 'div'); Graham -- Thank You Daniel Latter
Re: [fw-general] New To PHP Zend
On 24 Nov 2008, at 16:55, Django Woolf wrote: Hi All Am new to php/mysql and am looking to use Zend Framework as the backbone of my introduction into such application design, for the purposes of building dynamic web sites. I have made myself sufficiently familair with HTML as the first part of my learning and now wish to step up to building data driven web applications. Have fore-armed myself with several books for reference, but feel that at my advanced years and lack of technical nous...the best method for accelerated learning is to use the above, in a by rote manner.almost like building a jigsaw, which I can examine by seeing completed and working code. Could someone kindly offer a start point? thanks Mike Hi Mike, Welcome on board! I'd recommend Rob Allen's site/blog. He has a good tutorial at: http://akrabat.com/zend-framework-tutorial/ Rob also has a book that's due out any minute, which assumes you know PHP but goes through the Zend Framework very well. Rob's Book's site: Zend Framework in Action Padraic 'will get cross because I'm not using Unicode ;-)' Brady has a whole blog application series starting at: http://tinyurl.com/6o4xkq Beyond that there's the programmers reference, experimenting and this list. Hope this helps. All the best, Carlton
Re: [fw-general] zend_date with milliseconds question
Milliseconds are not supported in a default date/time string. But you can set them with setMillisecond. S is the millisecond part of a date (as set with setMillisecond) But A are the elapsed seconds of the actual day within the set timestamp. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Tim Rupp [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Monday, November 24, 2008 8:48 PM Subject: [fw-general] zend_date with milliseconds question Hi list, I noticed in the documentation for Zend_Date ( http://framework.zend.com/manual/en/zend.date.constants.html ) that 3 constants are available for outputting a millisecond time; S, A, and Zend_Date::MILLISECOND. When I use the constants though, I get different values. S returns 0 and A returns 49410 or some other slowly increasing number (looking at the code it looks like the current number of seconds that have elapsed in the day) If I do this $date-get(Zend_Date::MILLISECOND); I get 0, the same as using S. My question, is which of the constants specified in the documentation is correct? Creating a new date object does not set the milliseconds value either. I'm using version 1.6.1. Thanks, Tim
[fw-general] Our BugHunt winners. . .
Here are the top 3 from JIRA: Thomas Weidner- 18 fixed bugs Ben Eberlei - 14 fixed bugs Mickael Perraud - 3 fixed bugs Matthew fixed 15, but Zend employees aren't eligible. Besides, he already has a ZF shirt. :) There were a total of 59 bugs fixed that week, which is several times our weekly average. Not too shabby. If your name is listed above, please send me your mailing address. Don't include the list unless you really want everyone to know where you live. Congrats! ,Wil
[fw-general] White / Blank Screen when using MAMP
Hi, All I can get is a white screen when trying the framework. I have a .htaccess and it does appear to be working as I can cause 500 server errors when I chuck in some random text. Here is is anyway:- RewriteEngine on RewriteBase /zend/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php # Security: Don't allow browsing of directorie Options -Indexes Options +FollowSymLinks # PHP settings php_flag magic_quotes_gpc off php_flag register_globals off php_flag short_open_tag on I have ZF working on my works pc with this .htaccess. I have copied a working ZF test from the same pc, yet on my mac I get a blank screen. Please could someone shed some light :) Cheers -- View this message in context: http://www.nabble.com/White---Blank-Screen-when-using-MAMP-tp20668583p20668583.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] zend_date with milliseconds question
Thanks Thomas for that clarification. That would lead me to believe the documentation for A is incorrect then? -Tim On Mon, Nov 24, 2008 at 1:59 PM, Thomas Weidner [EMAIL PROTECTED] wrote: Milliseconds are not supported in a default date/time string. But you can set them with setMillisecond. S is the millisecond part of a date (as set with setMillisecond) But A are the elapsed seconds of the actual day within the set timestamp. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Tim Rupp [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Monday, November 24, 2008 8:48 PM Subject: [fw-general] zend_date with milliseconds question Hi list, I noticed in the documentation for Zend_Date ( http://framework.zend.com/manual/en/zend.date.constants.html ) that 3 constants are available for outputting a millisecond time; S, A, and Zend_Date::MILLISECOND. When I use the constants though, I get different values. S returns 0 and A returns 49410 or some other slowly increasing number (looking at the code it looks like the current number of seconds that have elapsed in the day) If I do this $date-get(Zend_Date::MILLISECOND); I get 0, the same as using S. My question, is which of the constants specified in the documentation is correct? Creating a new date object does not set the milliseconds value either. I'm using version 1.6.1. Thanks, Tim
Re: [fw-general] zend_date with milliseconds question
Yes... Elapsed seconds of this day is the correct description. Please add a issue ot jira so we can fix it. Thnx Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Tim Rupp [EMAIL PROTECTED] To: Thomas Weidner [EMAIL PROTECTED] Cc: fw-general@lists.zend.com Sent: Monday, November 24, 2008 9:13 PM Subject: Re: [fw-general] zend_date with milliseconds question Thanks Thomas for that clarification. That would lead me to believe the documentation for A is incorrect then? -Tim On Mon, Nov 24, 2008 at 1:59 PM, Thomas Weidner [EMAIL PROTECTED] wrote: Milliseconds are not supported in a default date/time string. But you can set them with setMillisecond. S is the millisecond part of a date (as set with setMillisecond) But A are the elapsed seconds of the actual day within the set timestamp. Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: Tim Rupp [EMAIL PROTECTED] To: fw-general@lists.zend.com Sent: Monday, November 24, 2008 8:48 PM Subject: [fw-general] zend_date with milliseconds question Hi list, I noticed in the documentation for Zend_Date ( http://framework.zend.com/manual/en/zend.date.constants.html ) that 3 constants are available for outputting a millisecond time; S, A, and Zend_Date::MILLISECOND. When I use the constants though, I get different values. S returns 0 and A returns 49410 or some other slowly increasing number (looking at the code it looks like the current number of seconds that have elapsed in the day) If I do this $date-get(Zend_Date::MILLISECOND); I get 0, the same as using S. My question, is which of the constants specified in the documentation is correct? Creating a new date object does not set the milliseconds value either. I'm using version 1.6.1. Thanks, Tim
Re: [fw-general] Our BugHunt winners. . .
Congratulations, everyone! And of course, thanks to everyone who participated, also those that aren't mentioned here. :-) Best regards, Tobias 2008/11/24 Wil Sinclair [EMAIL PROTECTED] Here are the top 3 from JIRA: Thomas Weidner- 18 fixed bugs Ben Eberlei - 14 fixed bugs Mickael Perraud - 3 fixed bugs Matthew fixed 15, but Zend employees aren't eligible. Besides, he already has a ZF shirt. :) There were a total of 59 bugs fixed that week, which is several times our weekly average. Not too shabby. If your name is listed above, please send me your mailing address. Don't include the list unless you really want everyone to know where you live. Congrats! ,Wil
Re: [fw-general] FCKEditor and Zend_Form integration
Thanks for your help guys, i got it working just using the jquery (using the new 1.7 zendx jquery) to change all textarea's with class wysiwyg to fckeditor boxes, as sugested. Didn't use the plugin. easy peasy once pointed the right way. ta. -- View this message in context: http://www.nabble.com/FCKEditor-and-Zend_Form-integration-tp19688738p20671594.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] New To PHP Zend
I would also recommend a basic guide to OO programming, as much of Zend takes advantage of PHP5's OO features, and unless you spend the time to formally learn OO it can be somewhat confusing. There are a number of fantastic tutorials out there on the Googles, but I personally read the first 2 chapters of Packt Publishing - Object-Oriented Programming with PHP5, which all made so much sense that I didn't need the rest of the book :P There's a lot more to OO than what you'll learn through an understanding the mechanics of it, it takes a number of years to really get to *think* in objects. Bruce Eckel's Thinking in Java is apparently a fantastic book for helping you down the road of truly understanding OO, but I've not read past the first few pages yet. Always so busy :/ On Tue, Nov 25, 2008 at 1:55 AM, Django Woolf [EMAIL PROTECTED] wrote: Hi All Am new to php/mysql and am looking to use Zend Framework as the backbone of my introduction into such application design, for the purposes of building dynamic web sites. I have made myself sufficiently familair with HTML as the first part of my learning and now wish to step up to building data driven web applications. Have fore-armed myself with several books for reference, but feel that at my advanced years and lack of technical nous...the best method for accelerated learning is to use the above, in a by rote manner.almost like building a jigsaw, which I can examine by seeing completed and working code. Could someone kindly offer a start point? thanks Mike -- View this message in context: http://www.nabble.com/New-To-PHP---Zend-tp20664844p20664844.html Sent from the Zend Framework mailing list archive at Nabble.com.
RE: [fw-general] White / Blank Screen when using MAMP
Hi You probably want to enable display_errors in your php.ini and also set error_reporting(E_ALL | E_STRICT). Then you might get something in your browser to let you know what has gone wrong. - Robert -Original Message- From: boxers999 [mailto:[EMAIL PROTECTED] Sent: 24 November 2008 20:00 To: fw-general@lists.zend.com Subject: [fw-general] White / Blank Screen when using MAMP Hi, All I can get is a white screen when trying the framework. I have a .htaccess and it does appear to be working as I can cause 500 server errors when I chuck in some random text. Here is is anyway:- RewriteEngine on RewriteBase /zend/ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* index.php # Security: Don't allow browsing of directorie Options -Indexes Options +FollowSymLinks # PHP settings php_flag magic_quotes_gpc off php_flag register_globals off php_flag short_open_tag on I have ZF working on my works pc with this .htaccess. I have copied a working ZF test from the same pc, yet on my mac I get a blank screen. Please could someone shed some light :) Cheers -- View this message in context: http://www.nabble.com/White---Blank-Screen-when-using-MAMP-tp20668583p206685 83.html Sent from the Zend Framework mailing list archive at Nabble.com. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system. This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
[fw-general] Re: Zend_Uri_Http OR Zend_Validate_Hostname BUG
Sorry, in my example I didn't check the Uri I have wrote. In my tests it was not exactly http://my.prj.lh but http://my_2008.prj.lhhttp://my.prj.lh and I can see that hostname validator doesn't supports underscores. So as I understand, this is not a bug, because underscore is not allowed hostname character. A bit confusing is that browsers (FF, Chrome) allows underscore to be used in at least local hostnames. -- Pagarbiai, Vladas Diržys Tel.: +370 620 69020 www.dirzys.com On Mon, Nov 24, 2008 at 4:28 PM, Vladas Diržys [EMAIL PROTECTED]wrote: Hello, I try to pass a local http uri (http://my.prj.lh;) to Zend_Uri, but it brings me an exception Invalid URI supplied. I can see in Zend_Http_Uri file, that it tries to validate with constant ALLOW_ALL code snippet: $validate = new Zend_Validate_Hostname(Zend_Validate_Hostname::ALLOW_ALL); but in the Zend_Validate_Hostname there is no place where it would check for this constant. At least I cant understand the logic... My question is, should validating my local address work? Or is it a BUG and it will be fixed? -- Pagarbiai, Vladas Diržys Tel.: +370 620 69020 www.dirzys.com