Login   Register  
PHP Classes
elePHPant
Icontem

File: read_only_property.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2011-08-11 02:31
Size: 215 bytes
 

Contents

Class file image Download
<?php

include("magic.php");

class 
Test extends ReadOnly
{
    public 
$_test "This is a read only property";
}

ini_set('display_errors'1);
error_reporting(E_ALL);

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