The online racing simulator
registerPacket callbacks, and registerSayCommands callbacks.
registerPacket callbacks, and registerSayCommands callbacks.

Due to adding support for the OutGuage packet, I'm taking a second pass on how these callbacks are both initiated, and sent to the callback.

$this->registerPacket(callback $callback, packetEnum $Packet, ...);
$this->registerSayCommand(callback $callback, String 'Command', String 'Description');

Where registerPacket would hand back the packet right away, and the hostID it came from looking like this:


<?php 
function callback(ISP_ISI $ISIString $HostID)
?>

And the registerSayCommand would hand back in the same way.

<?php 
function callback(ISP_MSO $MSOString $HostID)
?>

Or do you think that the Say command should have a level of abstraction attached to it?

Oh while I am at it.


<?php 
$this
->registerPacket('OutGuage'Out::Guage);

public function 
OutGuage(OutGuage $OG$HostID)
{
  
print_r($OG);
}
?>

Or should I just leave it alone?

FGED GREDG RDFGDR GSFDG