function _makeRecord(&$data, $typestr = '', $id = NULL, $type = NET_DIME_TYPE_UNKNOWN) { $record = new Net_DIME_Record($this->debug); if ($this->mb) { $record->setMB(); // all subsequent records are not message begin! $this->mb = 0; } if ($this->me) { $record->setME(); } if ($this->cf) { $record->setCF(); } $record->setData($data); $record->setType($typestr, $type); if ($id) { $record->setID($id); } #if ($this->debug) { # print str_replace('\0','*',$record->encode()); #} return $record->encode(); }