Prev | Current Page 700 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"


Let??™s run through the code for each of the pipeline sections in turn, which will take us to the
point where the order pipeline will be complete, apart from actual credit card authorization that
we??™ll implement in Chapter 20. We??™ll implement eight new classes with the following names:
??? PsInitialNotification
??? PsCheckFunds
??? PsCheckStock
??? PsStockOk
??? PsTakePayment
??? PsShipGoods
??? PsShipOk
??? PsFinalNotification
593
C H A P T E R 1 9
We??™ll discuss the classes we??™re creating as we go; we will not be using our typical Exercise
format for creating the order pipeline classes in the following pages. Before moving on,
remember that this code is available in the source code download section of the Apress web
site (http://www.apress.com).
PsInitialNotification
This is the first pipeline stage, which is responsible for sending an e-mail to the customer confirming
that the order has been placed. Create a new file named ps_initial_notification.php
in the business folder, and start adding code to it as shown here. This class starts off in what
will soon become a very familiar fashion:
class PsInitialNotification implements IPipelineSection
{
private $_mProcessor;
public function Process($processor)
{
// Set processor reference
$this->_mProcessor = $processor;
// Audit
$processor->CreateAudit('PsInitialNotification started.


Pages:
688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712
pozycjonowanie stron poker online księgarnia internetowa bukmacher ciekawe zdania