Re: [fw-general] Letter case problem in Zend_Http_Response

2010-10-15 Thread Ryan Chan
On Fri, Oct 15, 2010 at 9:23 PM, Matthew Weier O'Phinney wrote: > Again, are you running into _actual_ issues? Whether or not the > conversion is necessary is a pointless argument at this point; the > question is: is the behavior leading to problems? And would changing it > open new issues elsewhe

Re: [fw-general] Letter case problem in Zend_Http_Response

2010-10-15 Thread Ryan Chan
Hi all, On Fri, Oct 15, 2010 at 1:12 AM, Matthew Weier O'Phinney wrote: > > I think this may be due to how PHP handles header names, particularly > the "Location" header. However, I'm not 100% positive; hopefully Shahar > (author of the component) will jump in to respond. > The problem is if the

Re: [fw-general] Letter case problem in Zend_Http_Response

2010-10-14 Thread Ryan Chan
Hi, On Fri, Oct 15, 2010 at 12:32 AM, Artem Stepin wrote: >  this should help: > http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 > > "Each header field consists of a name followed by a colon (":") and the > field value. Field names are case-insensitive. " So I just wonder why only 1

[fw-general] Letter case problem in Zend_Http_Response

2010-10-14 Thread Ryan Chan
I have read the Zend_Http_Response: http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Http/Response.php The headers were constructed using... $this->headers[ucwords(strtolower($name))] = $value; So only 1st character will be upper case, others will be lower case. I

Re: [fw-general] Disable prepare statement in Zend_Db_Select

2010-06-08 Thread Ryan Chan
Hi, On Tue, Jun 8, 2010 at 12:47 AM, Bill Karwin wrote: > Keep in mind that the round-trip you fear incurs too much overhead is > actually not always a problem.  This article shows that at least in some > cases, a prepared MySQL query actually runs 14% _faster_ than a non-prepared > query: > http

[fw-general] Disable prepare statement in Zend_Db_Select

2010-06-07 Thread Ryan Chan
Hello, I have traced the source code of ZFW, and found the database adapter Zend_Db_Adapter_Mysqli always do a prepare when execute any SQL. However, I found it is not needed, since most of my query only run once in their life cycle - no reuse is needed. It is possible to disable auto prepare so

[fw-general] Generate code coverage report using phpunit/xdebug - using autoload

2010-03-11 Thread Ryan Chan
Hi, Is it possible to config/bootstrap so it can generate code coverage report if I am using autoload? I am following the codes in: http://code.google.com/p/zendcasts/source/browse/trunk/zc25-unit-testing/tests/application/bootstrap.php Any suggestion is highly recommended.

Re: [fw-general] Split controller actions into multiple classes

2009-09-22 Thread Ryan Chan
Hello, On Mon, Sep 21, 2009 at 9:55 PM, Matthew Weier O'Phinney wrote: >> If it is repetitive presentation logic you could sub-class the >> Zend_Controller_Action or create action helpers if the repeating logic are >> "cross cutting concerns". Keep in mind the saying is "fat model thin >> control

Re: [fw-general] Split controller actions into multiple classes

2009-09-18 Thread Ryan Chan
Hello, On Fri, Sep 18, 2009 at 9:48 PM, Sudheer Satyanarayana wrote: > On Friday 18 September 2009 07:10 PM, Ryan Chan wrote: >> > > Consider splitting your code into multiple controllers and perhaps modules. > Do you have model classes by the way? Consider the follow

[fw-general] Split controller actions into multiple classes

2009-09-18 Thread Ryan Chan
Hello, I have a controller that contains too many line of codes, which made the controller too large. So I want to split each action into eactly one class files. Is it recommended? If not, what are the recommended way to make the controller "thin"? Thanks.

[fw-general] Why serialize twice for Zend_Cache?

2009-09-08 Thread Ryan Chan
Hello, I am using Zend_Cache with Zend_Cache_Backend_Memcached (which is using php_memcache) extension. Since the php_memcache extension already do serialization automatically, but Zend_Cache would need me to serialize me before saving into cache, so this turn out that the data actually stored i

[fw-general] Lazy loading of Zend DB

2009-08-14 Thread Ryan Chan
Hello, I followed the tutorial at: http://framework.zend.com/docs/quickstart/create-a-model-and-database-table However, I am using pdo_mysql. It seems that if I put db setting, >> resources.db.adapter = xxx in the application.ini config, even my controller action don't need the databa

[fw-general] Put each action in a separate PHP file?

2009-08-08 Thread Ryan Chan
Hello, As a ZFW learner, I tried the quick start: http://framework.zend.com/docs/quickstart/create-a-form My problem is when the controller contains many action - it make the file too large to edit. So I want to split each action into a separate PHP file, is it possible? Thanks...

Re: [fw-general] Unit Testing ZFW

2009-08-08 Thread Ryan Chan
Hello, On Mon, Aug 3, 2009 at 10:08 PM, Tim Fountain wrote: > When you increased the memory limit, did the error above change to "Allowed > memory size of  1073741824 bytes exhausted..."? If not, remember that the > command line version of PHP has its own php.ini file, so make sure you're > editin

[fw-general] Unit Testing ZFW

2009-08-03 Thread Ryan Chan
Today I have downloaded 1.9. ZFW. I want to test its by running... php -f AllTests.php Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 7680 bytes) in /home/ZendFramework/tests/Zend/Config/Writer/XmlTest.php on line 54 I have checked my php.ini - memory limit is