News Feed
Sections




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

DevShed:
Protecting PHP 5 Class Data with Member Visibility
May 22, 2008 @ 09:37:05

In this new tutorial posted to DevShed, they take a look at working with classes in PHP5, specifically using the keywords for "member visibility" to make your classes a bit more structured.

The previous concept can also be applied successfully when it comes to defining the visibility of properties and methods in PHP classes. [...] Using the jargon of object-oriented programming, this capacity is widely known as member visibility. This capacity allows PHP programmers to establish whether the set of methods and properties of a specific class will be public, protected, or private.

They start more generally by looking at how to set up the variables globally and then move down the line talking about restrictions (private/protected/public) and how to get to them in the scripts outside the class.

0 comments voice your opinion now!
visibility class tutorial private protected public php5


blog comments powered by Disqus

Similar Posts

Nexen.net: PHP 4 and PHP 5 are in a boat : from will to reality

Tomas Petricek's Blog: Writing Silverlight applications in PHP

Ruslan Yakushev's Blog: How to install PHP PEAR and phploc on Windows

Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces

Sameer Borate: Integrating Googles new reCAPTCHA in PHP


Community Events





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


list symfony laravel version artisanfiles security podcast conference release language voicesoftheelephpant composer introduction interview tool community series library framework opinion

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