svn: /pear/packages/Net_DNS/trunk/Net/DNS/RR/ LOC.php

From: Date: Tue, 13 Apr 2010 06:48:54 +0000
Subject: svn: /pear/packages/Net_DNS/trunk/Net/DNS/RR/ LOC.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-59250@lists.php.net to get a copy of this message
clockwerx Tue, 13 Apr 2010 06:48:54 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297945 Log: maintain PHP4 compatibility Changed paths: U pear/packages/Net_DNS/trunk/Net/DNS/RR/LOC.php Modified: pear/packages/Net_DNS/trunk/Net/DNS/RR/LOC.php =================================================================== --- pear/packages/Net_DNS/trunk/Net/DNS/RR/LOC.php 2010-04-13 06:44:26 UTC (rev 297944) +++ pear/packages/Net_DNS/trunk/Net/DNS/RR/LOC.php 2010-04-13 06:48:54 UTC (rev 297945) @@ -32,21 +32,21 @@ // Static constants // Reference altitude in centimeters (see RFC 1876). - public static $reference_alt = 10000000; + var $reference_alt = 10000000; // Reference lat/lon (see RFC 1876). - public static $reference_latlon = 2147483648; // pow(2, 31); + var $reference_latlon = 2147483648; // pow(2, 31); // Conversions to/from thousandths of a degree. - public static $conv_sec = 1000; // 1000 milisecs. - public static $conv_min = 60000; // sec * 60 - public static $conv_deg = 3600000; // min * 60 + var $conv_sec = 1000; // 1000 milisecs. + var $conv_min = 60000; // sec * 60 + var $conv_deg = 3600000; // min * 60 // Defaults (from RFC 1876, Section 3). - public static $default_min = 0; - public static $default_sec = 0; - public static $default_size = 1; - public static $default_horiz_pre = 10000; - public static $default_vert_pre = 10; + var $default_min = 0; + var $default_sec = 0; + var $default_size = 1; + var $default_horiz_pre = 10000; + var $default_vert_pre = 10; var $data; // Contains packed binary data in the LOC format. var $offset; // Offset to start reading the data. @@ -124,21 +124,21 @@ // If these are all 0, use the defaults. if (!$this->size) { - $this->size = static::$default_size; + $this->size = $this->default_size; } if (!$this->hp) { - $this->hp = static::$default_horiz_pre; + $this->hp = $this->default_horiz_pre; } if (!$this->vp) { - $this->vp = static::$default_vert_pre; + $this->vp = $this->default_vert_pre; } $this->raw_latitude = $a['lat']; $this->raw_longitude = $a['long']; $this->raw_alt = $a['alt']; - $this->altitude = ($this->raw_alt - static::$reference_alt) / 100; + $this->altitude = ($this->raw_alt - $this->reference_alt) / 100; $this->pretty_print_string = $this->latlon2dms($this->raw_latitude, "NS", true) . ' ' . @@ -234,17 +234,17 @@ $flipped = true; } - $abs = abs($rawmsec - static::$reference_latlon); - $deg = intval($abs / static::$conv_deg); - $abs -= $deg * static::$conv_deg; - $min = intval($abs / static::$conv_min); - $abs -= $min * static::$conv_min; - $sec = intval($abs / static::$conv_sec); - $abs -= $sec * static::$conv_sec; + $abs = abs($rawmsec - $this->reference_latlon); + $deg = intval($abs / $this->conv_deg); + $abs -= $deg * $this->conv_deg; + $min = intval($abs / $this->conv_min); + $abs -= $min * $this->conv_min; + $sec = intval($abs / $this->conv_sec); + $abs -= $sec * $this->conv_sec; $msec = $abs; - $hem = substr($hems, (($rawmsec >= static::$reference_latlon) ? 0 : 1), 1); + $hem = substr($hems, (($rawmsec >= $this->reference_latlon) ? 0 : 1), 1); if ($flipped) { - $hem = substr($hems, (($rawmsec >= static::$reference_latlon) ? 1 : 0), 1); + $hem = substr($hems, (($rawmsec >= $this->reference_latlon) ? 1 : 0), 1); } // Save the results.

« previous php.pear.cvs (#59250) next »