root/branches/PRE_NAMESPACES/examples/Dog.php

Revision 103, 247 bytes (checked in by mikey, 1 year ago)

added implicit and explicit call to set as well as possibility for setting public properties
whitespace fixes

Line 
1 <?php
2 class Dog
3 {
4     protected $properties = array();
5     
6     public function __set($name, $value)
7     {
8         $this->properties[$name] = $value;
9     }
10     
11     public function getProperties()
12     {
13         return $this->properties;
14     }
15 }
16 ?>
Note: See TracBrowser for help on using the browser.