Posted by Jeff on 07/29/07 16:53
PHP version 5.2.3
Below you see some .NET code. This is a class contain a private member
variable. For other classes to access this private variable they have to use
the public method. I'm wondering if something similar is possible with
object-oriented PHP (5.2.3) programming??
class Period
{
private double _second;
public double Seconds
{
get { return _second; }
set { _second = value; }
}
}
Navigation:
[Reply to this message]
|