File: D:/HostingSpaces/SBogers10/spire.komma-mediadesign.nl/wwwroot/kms/app/models/m_page.php
<?php
/*
This class containes global objects and functions which are required for all pages
*/
require_once DOCUMENT_ROOT.'app/models/m_dataSession.php';
class Page
{
/**
*
* @var class DatabaseHandler object for executing basic queries
*/
protected $dbh;
/**
*
* @var class DataSession object for storing data in a session during adding or editing a form.
*/
protected $dataSession;
/**
*
* @var string Name of the databasetable that queries are going to use
*/
protected $tableName;
/**
*
* @var int Maximum items to display on a page
*/
protected $maxItems = 0;
/**
*
* @var array List of errors that appear during validating
*/
protected $errors = array();
protected $lang;
/*
*
* Constructor
*/
public function __construct()
{
global $template;
$this->lang = $template->lang;
}
/*
GET / SET
*/
/**
* Get any errors produced through the last validation.
*
* @return array
*/
public function getErrors()
{
return $this->errors;
}
/**
* Returns tableName
*
* @return string
*/
public function getTableName()
{
return $this->tableName;
}
/**
* Returns tableName
*
* @param int
* @return null
*/
public function setMaxItems($int)
{
if($int != NULL && is_numeric($int))
{
$this->maxItems = $int;
}
}
/**
* UnSets the dataSession
*
* @return null
*/
public function clean()
{
$this->dataSession->clear();
}
}