PHP PDO, Custom Exception Handler, Namespaces for E-commerce
What you'll learn
- Upgrade database class to use PHP PDO
- Learn what are namespaces and how to use them with out system
- Create custom Exception handler to deal with any uncaught exceptions thrown by the system
- Replace PHPMailer with Zend Framework 2 Mail component
Requirements
- Because we will be using features such as namespacing, you will have to make sure that your web hosting supports PHP version 5.3 +
- Standard PHP web hosting environment with php, mysql and php PDO class enabled.
Description
This is the 3rd add-on series to our main E-commerce website with PHP, MySQL jQuery and PayPal course.
In this series we will convert our old database class to the new, PDO wrapper class with all necessary methods to run our system using prepared statements and transaction methods to perform more complex operations.
We will also create a Custom Exception Handler for those exceptions, which haven't been caught within the try / catch statement. The Exception Handler will display a different message based on whether the site is in the production or development environment - to ensure that our visitors don't see any sensitive information should any accidental exception be thrown while they are browsing our online shop.
We will make use of the namespaces - introduced in PHP 5.3 in order to distinguish between our core classes and any external libraries we might add to the system.
We will replace the previously used PHPMailer with the Zend Framework 2 Mail component. This will give you a good understanding of how useful namespaces are when working with different libraries.
Associated titles:
Build E-commerce website with PHP, MySQL, jQuery and PayPal
Static Urls, Meta tags and Re-send activation for E-commerce series (1st add-on)
Shipping address and Shipping cost for E-commerce series (2nd add-on)
Who this course is for:
- Anyone who previously completed the main course and the first 2 add-on series
- Anyone who wish to learn about the topics included in the description
- Previous PHP knowledge is required on the basic / intermediate level
Instructor
A passionate web developer with experience spreading over a decade. Founder of SSD Tutorials where he publishes his free and premium tutorials on how to build modern web applications. Currently living and working in UK as a Senior Web Developer. Hobbies include snowboarding, mountain biking, hiking, gardening, travelling and macro photography.