Beispiel #1
0
 /**
  * we have our own constructor so that we can load our certificate
  * information for parsing.
  *
  * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet to parse the RR from
  * @param array           $rr      a array with parsed RR values
  *
  * @return
  *
  */
 public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null)
 {
     parent::__construct($packet, $rr);
     //
     // load the lookup values
     //
     $this->cert_format_name_to_id = array_flip($this->cert_format_id_to_name);
 }
Beispiel #2
0
 /**
  * Constructor - builds a new Net_DNS2_RR_OPT object; normally you wouldn't call
  * this directly, but OPT RR's are a little different
  *
  * @param Net_DNS2_Packet &$packet a Net_DNS2_Packet packet or null to create
  *                                 an empty object
  * @param array           $rr      an array with RR parse values or null to
  *                                 create an empty object
  *
  * @throws Net_DNS2_Exception
  * @access public
  *
  */
 public function __construct(Net_DNS2_Packet &$packet = null, array $rr = null)
 {
     //
     // this is for when we're manually building an OPT RR object; we aren't
     // passing in binary data to parse, we just want a clean/empty object.
     //
     $this->type = 'OPT';
     $this->rdlength = 0;
     $this->option_length = 0;
     $this->extended_rcode = 0;
     $this->version = 0;
     $this->do = 0;
     $this->z = 0;
     //
     // everthing else gets passed through to the parent.
     //
     if (!is_null($packet) && !is_null($rr)) {
         parent::__construct($packet, $rr);
     }
 }