Hi,
Thomas Weidner-2 wrote:
>
> You can use Zend_Measure with the following changes:
> $unit = new Zend_Measure(0, Zend_Measure::LENGTH, 'de');
> $unit->setValue('1.000', Zend_Measure_Length::MILLIMETER);
>
> This is like the old code
> $unit = new Zend_Measure('1.000', Zend_Measure_Length::MILLIMETER, 'de');
>
Well IMHO constructing a measure that can only use a default seems a bit
odd. If the only problem is the string of the constant then i'd rather see
an extra parameter there then having to spend an extra line overriding the
initial value i put in. Although I could think of a few ways in which this
can be worked around. Another way to do it could be to add the
Zend_Measure_Abstract to the constructor instead of mearly it's name.
As to what extending measurements; I was thinking this would be applied when
fictional measurements are involved. Now I don't know exactly how often it
would actually be used in such a way but it's not entirely inconsievable it
wouldn't. Well, just a thought.
Wilco
--
View this message in context:
http://www.nabble.com/Zend_Measure-constants-wrong--tf3045247s16154.html#a8555914
Sent from the Zend Framework mailing list archive at Nabble.com.