<?php

// Page class
// Date: 2012-06-13

class Page
{
  protected $Content = 'ggg';
  protected $Language;
  protected $Key;
  public $Link;

  function __construct($Key,$Language)
  {
	  $this->Language = $Language;
	  $Name = $Language->Texts[$Key]['name'];
	  $Title = $Language->Texts[$Key]['title'];
	  $Addres = '?'.$Key;
	  $this->Key = $Key;
	  $this->Link = new Link($Name,$Addres,$Title);  
  }

//Generate and show this page
  public function Show() {
	$this->Generate();
	echo ($this->Content);
  }  

  protected function Generate($Content) {
	$this->Content = $Content;
  }

//Get key of page
  public function GetKey() {
	return $this->Key;
  }  

//sets title of page
  protected function SetTitle($Title) {
	$this->Link->Title = $Title;
  }

}
?>
