-- Ben Scholzen 'DASPRiD' <[EMAIL PROTECTED]> wrote
(on Monday, 10 November 2008, 09:05 PM +0100):
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> > Actually, you could do the column values in the options hash as well:
> > 
> > $options = array(
> >     'columnWidths' => array(9, 8),
> >     'separation'   => 'header',
> >     'decorator'    => 'Ascii',
> >     'padding'      => 1
> > );
> > $table = new Zend_Text_Table($options);
> 
> Well I'm really no fan of putting required arguments into an optional
> config array. When Zend once will create a standard about that, I will
> vote for required arguments staying as arguments, and only all the other
> stuff should move to an options array than.

You can enforce required arguments in your constructor even with an
options array/Zend_Config object. If the key is not present, throw an
exception. This is actually more useful than relying on error handling,
too, as you can then continue program execution via your exception
handler... but I digress. :)


> > By the way, in the future you should be able to auto-size the table
> > around the data it contains.
> 
> Well, auto-sizing would take the ability of auto-word-wrap, but yeah,
> that's a possible idea.
> 
> Ben
> ...................................
> :  ___   _   ___ ___ ___ _ ___    :
> : |   \ /_\ / __| _ \ _ (_)   \   :
> : | |) / _ \\__ \  _/   / | |) |  :
> : |___/_/:\_\___/_| |_|_\_|___/   :
> :........:........................:
> : Web    : http://www.dasprids.de :
> : E-mail : [EMAIL PROTECTED]       :
> : Jabber : [EMAIL PROTECTED]     :
> : ICQ    : 105677955              :
> :........:........................:
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkkYlAoACgkQ0HfT5Ws789C/oACgrjbfy5m2+NehoRfsSNYDQqn0
> Il4AnApN6Rbs6mvRCJTSggjan2m0DyYJ
> =Gvrp
> -----END PGP SIGNATURE-----
> 

-- 
Matthew Weier O'Phinney
Software Architect       | [EMAIL PROTECTED]
Zend Framework           | http://framework.zend.com/

Reply via email to