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

From: Date: Tue, 13 Apr 2010 06:44:26 +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-59249@lists.php.net to get a copy of this message
clockwerx Tue, 13 Apr 2010 06:44:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=297944 Log: Minor refactoring 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:41:13 UTC (rev 297943) +++ pear/packages/Net_DNS/trunk/Net/DNS/RR/LOC.php 2010-04-13 06:44:26 UTC (rev 297944) @@ -80,9 +80,15 @@ var $version; /* }}} */ - /* class constructor - RR(&$rro, $data, $offset = '') {{{ + /** + * class constructor - RR(&$rro, $data, $offset = '') + * + * Usage: + * $rr = new Net_DNS_RR_LOC($rro, $data, $offset); + * $rr->parse(); + * {{{ */ - function Net_DNS_RR_LOC(&$rro, $data, $offset = 0) + function Net_DNS_RR_LOC($rro, $data, $offset = 0) { // Keep all of the common fields. $this->name = $rro->name; @@ -95,16 +101,13 @@ // And keep the actual data. $this->data = $data; $this->offset = $offset; - - // Finally parse the actual data. - $this->parse_data(); } /** - * Net_DNS_RR_LOC::parse_data() + * Net_DNS_RR_LOC::parse() * Parses the $data field. */ - function parse_data(){ + function parse() { if (isset($this->offset) && isset($this->data) && !($this->parsed)) { if ($this->rdlength > 0) { $off = $this->offset; @@ -145,7 +148,7 @@ $this->hp . 'm ' . $this->vp . 'm'; - $this->parsed = TRUE; + $this->parsed = true; } } }

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