The code column is interesting because it allows us to associate specific messages with an identifying number.We
can have another database table that matched these code numbers with descriptions, although this isn??™t really
necessary because the scheme used for numbering (as you??™ll see later in the chapter) is quite descriptive. In addition,
we have the message column, which already provides human-readable information.
For demonstration purposes, we set the administrator and supplier e-mail addresses to fictitious e-mail addresses,
which should also be the address of the customer used to generate test orders.We should do this to ensure everything
is working properly before sending mail to the outside world.
Let??™s now look at the OrderProcessor class. The main body of the OrderProcessor class is the Process()
method, which is now called from presentation/admin_order_details.php to process an order:
public function Process()
{
// Configure processor
$this->mContinueNow = true;
Next we used the CreateAudit() method to add an audit entry indicating that the OrderProcessor has started:
// Log start of execution
$this->CreateAudit('Order Processor started.', 10000);
?– Note 10000 is the code to store for the audit entry.We'll look at these codes in more detail shortly.
Next we come to the order processing itself. The model used here is to check the Boolean $mContinueNow field
before processing a pipeline section.
Pages:
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699