<?php
/**
* Web Application Component Toolkit
*
* @link http://www.phpwact.org/
*
* @author Wact Development Team
* @link http://www.phpwact.org/team
*
* @copyright Copyright 2006, Jeff Moore
* @license http://opensource.org/licenses/mit-license.php MIT
*/

/**
*/
class Wact_Controller_Transition_Form extends Wact_Controller_Transition_Link {

    const CHANNEL_POST = 'post';

    /**
    */
    protected $channels = array(
        self::CHANNEL_DERIVED => array(),
        self::CHANNEL_GET => array(), 
        self::CHANNEL_PATH_INFO => array(),
        self::CHANNEL_POST => array());

    /**
    */
    protected $usedPostVars = array();

    /*
    */
    function getPost($name) {
        if (isset($this->channels[self::CHANNEL_POST][$name])) {
            $this->usedPostVars[] = $name;
            return $this->channels[self::CHANNEL_POST][$name];
        }
    }

    /*
    */
    function getRemainingState() {
        // possibly an array function to do this is one swell foop?
        $state = isset($this->channels[self::CHANNEL_POST]) ? $this->channels[self::CHANNEL_POST] : array();
        foreach ($this->usedPostVars as $name) {
            unset($state[$name]);
        }
        return $state;
    }
    
}

?>