PHP Classes

File: read_only_property.php

Recommend this page to a friend!
  Classes of Artur Graniszewski  >  C# getters and setters in PHP  >  read_only_property.php  >  Download  
File: read_only_property.php
Role: Example script
Content type: text/plain
Description: Example: marks all properties with an underscore as the first letter of their names as a read-only
Class: C# getters and setters in PHP
Access class variables with setters and getters
Author: By
Last change:
Date: 10 years ago
Size: 215 bytes


Class file image Download


Test extends ReadOnly
$_test = "This is a read only property";

ini_set('display_errors', 1);

$x = new Test();
$x->_test = "aaa";

For more information send a message to info at phpclasses dot org.