Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Format.php
| From: | Daniel Convissor | Date: | Thu, 10 Nov 2005 10:54:20 +0000 |
| Subject: | Re: cvs: pear /Spreadsheet_Excel_Writer/Writer Format.php | ||
| References: | 1 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-36205@lists.php.net to get a copy of this message | ||
Hi Xavier:
On Wed, Nov 09, 2005 at 12:29:37AM -0000, Xavier Noguer Gallego wrote:
> xnoguer Tue Nov 8 19:29:37 2005 EDT
>
> Modified files:
> /pear/Spreadsheet_Excel_Writer/Writer Format.php
> Log:
> adding new methods setVAlign() and setHAlign() (request #2480)
...snip...
> + if ($location == 'left') {
> + $this->_text_h_align = 1;
> + }
> + if ($location == 'centre') {
> + $this->_text_h_align = 2;
> + }
> + if ($location == 'center') {
... snip...
In situations like this, a switch statement is far more efficient and
readable. http://php.net/switch
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409