%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php
require_once __DIR__.'/../app/data.php';
class UserModel
{
protected $id;
protected $data = array();
protected $saved = false;
public function getName()
{
return $this->data['name'];
}
function setName($name)
{
$this->data['name'] = 'Mr. '.$name;
}
function getId()
{
return $this->id;
}
function get($param)
{
if (!isset($this->data[$param])) throw new \Exception('Key does not exist!');
return $this->data[$param];
}
function set($param, $value)
{
$this->data[$param] = $value;
}
function save()
{
if (!$this->id) $this->id = uniqid();
data::set($this->id, $this->data);
$this->saved = true;
return true;
}
}