equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Measure |
16 * @package Zend_Measure |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Abstract.php 21329 2010-03-04 22:06:08Z thomas $ |
19 * @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Locale |
23 * @see Zend_Locale |
24 */ |
24 */ |
38 * Abstract class for all measurements |
38 * Abstract class for all measurements |
39 * |
39 * |
40 * @category Zend |
40 * @category Zend |
41 * @package Zend_Measure |
41 * @package Zend_Measure |
42 * @subpackage Zend_Measure_Abstract |
42 * @subpackage Zend_Measure_Abstract |
43 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
43 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
44 * @license http://framework.zend.com/license/new-bsd New BSD License |
44 * @license http://framework.zend.com/license/new-bsd New BSD License |
45 */ |
45 */ |
46 abstract class Zend_Measure_Abstract |
46 abstract class Zend_Measure_Abstract |
47 { |
47 { |
48 /** |
48 /** |
72 protected $_units = array(); |
72 protected $_units = array(); |
73 |
73 |
74 /** |
74 /** |
75 * Zend_Measure_Abstract is an abstract class for the different measurement types |
75 * Zend_Measure_Abstract is an abstract class for the different measurement types |
76 * |
76 * |
77 * @param $value mixed - Value as string, integer, real or float |
77 * @param mixed $value Value as string, integer, real or float |
78 * @param $type type - OPTIONAL a measure type f.e. Zend_Measure_Length::METER |
78 * @param int $type OPTIONAL a measure type f.e. Zend_Measure_Length::METER |
79 * @param $locale locale - OPTIONAL a Zend_Locale Type |
79 * @param Zend_Locale $locale OPTIONAL a Zend_Locale Type |
80 * @throws Zend_Measure_Exception |
80 * @throws Zend_Measure_Exception |
81 */ |
81 */ |
82 public function __construct($value, $type = null, $locale = null) |
82 public function __construct($value, $type = null, $locale = null) |
83 { |
83 { |
84 if (($type !== null) and (Zend_Locale::isLocale($type, null, false))) { |
84 if (($type !== null) and (Zend_Locale::isLocale($type, null, false))) { |