<?php

require_once '../../../../Wact/Loader.inc.php';
Wact_Loader::setupWact();

class WactFrontLinkTagExample extends Wact_Controller_Base {

    /**
    * setup the structure of our application.
    */
    function setup() {
        $reader = new Wact_Template_Reader_File(realpath('.'), 'templates');
        $cache = new Wact_Cache_Store_Transient();
        $loader = new Wact_Template_Loader($reader, $cache);

        $this->onFocusDo($this, 'init');

        $this->defineInput(new Wact_Request_PathInfo());
        $this->dispatchOn(new Wact_Request_Segmented('command', 'PATH_INFO'));

        $this->setView($loader->load('link.tpl.html'));

        $this['test']->defineInput(new Wact_Request_Url('testParam'));
    }

    function init($sender, $request, $responseModel) {
        $responseModel->someVar = 'someValue';
    }

}

Wact_Exception_Handler::installNew();

$config = new Wact_Config_Registry();
$config->WactFrontLinkTagExample->start();

?>