コード例 #1
0
 protected function get_measurement_type_enum($measurement_type)
 {
     return MeasurementFactory::get_measurement_type_enum($measurement_type);
 }
コード例 #2
0
 function construct_width_range($max, $min, $from, $to)
 {
     try {
         $width_range = array();
         if ($min !== NULL) {
             array_push($width_range, $this->size_unit_converter_to_any($min, $from, MeasurementFactory::get_measurement_type_enum($to)));
         } else {
             array_push($width_range, $min);
         }
         if ($max !== NULL) {
             array_push($width_range, $this->size_unit_converter_to_any($max, $from, MeasurementFactory::get_measurement_type_enum($to)));
         } else {
             array_push($width_range, $max);
         }
         return $width_range;
     } catch (Exception $e) {
         $this->set_error($e);
     }
 }