News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Developer.com:
PHP 5 OOP - Protecting Data With Visibility
May 10, 2006 @ 15:02:18

In Developer.com's latest article, they continue their series (part 1) of working with PHP5's object system to create an abstraction layer, specifically a database layer.

In the prior article, PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern, I presented an interface for abstracting database access from the actual database. The article also presented code for accessing a database.

In this article you will learn to expand upon the functionality you built from the first article in order to show how to protect your data using visibility modifiers.

They start with a look at some of the "accessibility modifiers" that PHP5 has to offer - like private or public - in it's object model. They define them in the context of their database class as well, demonstrating how both variables and classes can be marked this way. After this, it's all about the code, looking first at preparing the SQL query, then validate the SQL before sending it off to the last step - executing the query and fetching the results (if needed).

0 comments voice your opinion now!
php5 oop protecting data visibility part2 php5 oop protecting data visibility part2


blog comments powered by Disqus

Similar Posts

Stefan Mischook's Blog: Object Oriented PHP Tutorial Updated - Steps 18 - 22

HowTo Forge: How To Harden PHP5 With Suhosin (Debian Etch/Ubuntu)

DevShed: Searching and Replacing Nodes with SimpleXML in PHP 5 (Part 3)

Zend Developer Zone: PHP Built in Input filtering

DevShed: Building a PHP 5 Form Processor - Coding the Form Generator Module


Community Events





Don't see your event here?
Let us know!


interview threedevsandamaybe api series deployment introduction framework symfony conference laravel tips release language zendserver podcast list code voicesoftheelephpant bugfix community

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework