News Feed
Jobs Feed
Sections




News Archive
Wes Shell's Blog:
Encapsulation in PHP
October 13, 2009 @ 09:05:16

Wes Shell has posted a new tutorial to his blog today looking at encapsulation in PHP development - containing parts of the script to make them easier to work with as a whole.

In order to understand the purpose of encapsulation you first need to understand the purpose of classes. [...] In order for them to be used properly as they were designed, you will need to limit how users of the class can interact with those characteristics and functionality.

He looks at the visibility modifiers (public/private/protected), interface functions and some sample code showing how to use them in a simple class to work with a Person's set of data.

1 comment voice your opinion now!
tutorial encapsulation visibility


blog comments powered by Disqus

Similar Posts

DevShed: Fetching Search Results as Serialized Arrays with Yahoo Web Services and PHP 5

Developer.com: Build Multi-lingual Websites With the Zend Framework

DevShed: Creating a Login Script for a PHP Invoicing System

DevShed: Using PDO Objects in PHP 5 - Using the PDO extension

Rob Allen's Blog: Updated Tutorial for Zend Framework 1.5


Community Events









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


functional zendframework2 event example podcast framework development community interview language release introduction opinion object code api tool composer unittest testing

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