<?php
/**
* Create an active record instance.
*/
$user = new User($pdo);
/**
* Read the row with the given ID from the database.
*/
$user->read($id);
/**
* Returns the name.
*/
$user->getName(); // John
/**
* Set a new name.
*/
$user->setName('Jane');
/**
* Synchronize the active record with the database.
*/
$user->sync();