traducir texto php

titi
05 de Mayo del 2005
Alguien podría describirme paso a paso que es lo que hace el siguiente fragmento de php. Gracias
<?php
class PropertyObject
{
private $_properties = array ("name" => "null", "dateofbirth" => "nul");
function __get ($propertyName)
{
if (!array_key_exists($propertyName, $this->_properties))
throw new Exception ('Invalid property value!');
if (method_exists($this, 'get' .$propertyName))
{
return call_user_func(array($this, 'get' .$propertyName));
}
else
{
return $this->_properties[$propertyName];
}
}

function __set($propertyName, $value)
{
if (!array_key_exists($propertyName, $this->_properties))
throw new Exception ('Invalid property value!');
if (method_exists($this, 'set' .$propertyName))
{
return call_user_func(array($this, 'set' .$propertyName),
$value);
}
else
{
return $this->_properties[$propertyName] = $value;
}
}
function setDateOfBirth($dob)
{
if(strtotime($dob) ==-1)
{
throw new Exception ('The date of birth must be a valid date!');
}
$this->_properties['dateofbirth'] = $dob;
}
function sayHello()
{
print "Hi ! My name is $this->name. I was born on $this->dateofbirth";
}
}
?>