dbscript
[ class tree: dbscript ] [ index: dbscript ] [ all elements ]

Source for file continuation.php

Documentation is available at continuation.php

  1. <?php
  2.  
  3.   /** 
  4.    * dbscript for PHP 4 & 5 - restful crud framework
  5.    * @version 0.1.2 -- 19-Feb-2007
  6.    * @author Brian Hendrickson <brian@dbscript.net>
  7.    * @link http://dbscript.net/
  8.    * @copyright Copyright 2007 Brian Hendrickson
  9.    * @package dbscript
  10.    * @license http://www.opensource.org/licenses/mit-license.php MIT License
  11.    */
  12.  
  13.   /**
  14.    * Continuation
  15.    * 
  16.    * Incomplete, should pump Comet-style state-change
  17.    * messages to Ajax or other clients or controllers.
  18.    * 
  19.    * More info...
  20.    * {@link http://dbscript.net/continuation}
  21.    * 
  22.    * @package dbscript
  23.    * @author Brian Hendrickson <brian@dbscript.net>
  24.    * @access public
  25.    * @version 0.1.2
  26.    * @todo implement
  27.    */
  28.    
  29. class Continuation {
  30.  
  31.   var $start_state;
  32.   var $entry_actions = array();
  33.   var $states = array();
  34.   var $exit_actions = array();
  35.   var $end_state;
  36.   var $resource;
  37.   var $responds_to;
  38.   var $template_path;
  39.   
  40.   function set_start_state$str {
  41.     $this->start_state = $str;
  42.   }
  43.  
  44.   function add_view_state$arr {
  45.     $this->states[$arr[0]] new ViewState(
  46.       array(
  47.         'id'=>$arr[0],
  48.         'transition_on'=>$arr[1],
  49.         'transition_to'=>$arr[2],
  50.         'action_bean'=>$arr[3],
  51.         'view'=>$arr[4) );
  52.   }
  53.  
  54.   function add_action_state$arr {
  55.     $this->states[$arr[0]] new ActionState
  56.       array(
  57.         'id'=>$arr[0],
  58.         'transition_on'=>$arr[1],
  59.         'transition_to'=>$arr[2],
  60.         'action_bean'=>$arr[3) );
  61.   }
  62.   
  63.   function set_end_state$str {
  64.     $this->end_state = $str;
  65.   }
  66.   
  67.   function add_entry_action$bean$method {
  68.     $this->entry_actions[$bean$method;
  69.   }
  70.  
  71.   function add_exit_action$bean$method {
  72.     $this->exit_actions[$bean$method;
  73.   }
  74.  
  75. }
  76.  
  77. ?>

Documentation generated on Mon, 19 Feb 2007 10:24:42 -0800 by phpDocumentor 1.3.1