Well, the idea is you can add this improvement in the next release (1.7.1
perhaps) without breaking BC.  Otherwise, it breaks BC.  For now, you could
just throw an exception if that value is not present.
So if the columnWidths field is not present, use auto-sizing; if a null
value is present in the columnWidths array, use auto-sizing for that field.
 This way, field sizes can act as maximum width, used as you said with word
wrap.

-Matt

On Mon, Nov 10, 2008 at 12:05 PM, Ben Scholzen 'DASPRiD'
<[EMAIL PROTECTED]>wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hey again,
>
> > 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.
>
> > 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-----
>

Reply via email to