rendered paste body<?php
class Template_Screenshot {
private $_screenshot = array();
private static $_screenshot_fields = array(
'id', 'id_screenshot_description', 'id_page', 'id_tm', 'scr_type_id',
'width', 'height', 'uri', 'href', 'label');
// simulates directly fetching a key's value
public function __get($key) {
$_return = null;
if ($this->_screenshot[$key]) {
$_return = $this->_screenshot[$key];
}
return $_return;
}
// make the screenshot object
public function __construct($options) {
$this->_screenshot = $options;
}
// make the screenshot object
public static function getFields() {
return self::$_screenshot_fields;
}
}
?>