private function dispatch_encode($symbology, $data, $options) {
switch (strtolower(preg_replace('/[^A-Za-z0-9]/', '', $symbology))) {
case 'upca' : return $this->upc_a_encode($data);
case 'upce' : return $this->upc_e_encode($data);
case 'ean13nopad' : return $this->ean_13_encode($data, ' ');
case 'ean13pad' : return $this->ean_13_encode($data, '>');
case 'ean13' : return $this->ean_13_encode($data, '>');
case 'ean8' : return $this->ean_8_encode($data);
case 'code39' : return $this->code_39_encode($data);
case 'code39ascii': return $this->code_39_ascii_encode($data);
case 'code93' : return $this->code_93_encode($data);
case 'code93ascii': return $this->code_93_ascii_encode($data);
case 'code128' : return $this->code_128_encode($data, 0,false);
case 'code128a' : return $this->code_128_encode($data, 1,false);
case 'code128b' : return $this->code_128_encode($data, 2,false);
case 'code128c' : return $this->code_128_encode($data, 3,false);
case 'code128ac' : return $this->code_128_encode($data,-1,false);
case 'code128bc' : return $this->code_128_encode($data,-2,false);
case 'ean128' : return $this->code_128_encode($data, 0, true);
case 'ean128a' : return $this->code_128_encode($data, 1, true);
case 'ean128b' : return $this->code_128_encode($data, 2, true);
case 'ean128c' : return $this->code_128_encode($data, 3, true);
case 'ean128ac' : return $this->code_128_encode($data,-1, true);
case 'ean128bc' : return $this->code_128_encode($data,-2, true);
case 'codabar' : return $this->codabar_encode($data);
case 'itf' : return $this->itf_encode($data);
case 'itf14' : return $this->itf_encode($data);
case 'qr' : return $this->qr_encode($data, 0);
case 'qrl' : return $this->qr_encode($data, 0);
case 'qrm' : return $this->qr_encode($data, 1);
case 'qrq' : return $this->qr_encode($data, 2);
case 'qrh' : return $this->qr_encode($data, 3);
case 'dmtx' : return $this->dmtx_encode($data,false,false);
case 'dmtxs' : return $this->dmtx_encode($data,false,false);
case 'dmtxr' : return $this->dmtx_encode($data, true,false);
case 'gs1dmtx' : return $this->dmtx_encode($data,false, true);
case 'gs1dmtxs' : return $this->dmtx_encode($data,false, true);
case 'gs1dmtxr' : return $this->dmtx_encode($data, true, true);
}
return null;
}