<?xml version="1.0" encoding="ISO-8859-1"?>
<slide fontsize="6em">
	<title>__set() and __get()</title>

	<list marginleft="3em" margintop="0em" fontsize="3.5em">
		<bullet>Property access handlers</bullet>
		<bullet>In combination with private</bullet>
		<bullet>As replacement for 'dynamic properties'</bullet>
	</list>

	<break />

    <example fontsize="0.9em"><![CDATA[<?php
	class OSses {
		private $names = array();

		public function __set($name, $value) {
			if (!in_array($name, array('windows', 'dos')))
				$this->names[$name] = $value;
		}

		public function getNames() {
			return $this->names;
		}
	}

	$osses = new OSses();
	$osses->linux = 'rocks';
	$osses->windows = 'blows';

	var_dump($osses->getNames());
? >]]></example>

    <example fontsize="1em"><![CDATA[array(1) {
  ["linux"]=>
  string(5) "rocks"
}]]></example>
</slide>
