News Feed
Sections




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

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

Community News: Zend Releases Speaker List for ZendCon 2006

Vid Luther's Blog: Deploying Wordpress with Phing to the Rackspace Cloud

Gonzalo Ayuso's Blog: Moving singleton and factory patterns to Abstract with php 5.3

IBM developerWorks: Devise Web 2.0 applications with PHP and DHTML (Part 1)

Zend Developer Zone: Get to know Flex and Zend_Amf


Community Events





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


introduction community opinion series install library laravel list framework api language podcast release zendserver deployment interview update tips symfony package

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