Method.class.php (730B)
1 <?php 2 3 4 namespace cms\action; 5 6 /** 7 * Method. 8 * 9 * A Method is divided into 10 * - a view and 11 * - a post action. 12 * 13 * Every Method must implement this interface. 14 * 15 * @package cms\action 16 */ 17 interface Method 18 { 19 /** 20 * View. 21 * 22 * View action for displaying data. 23 * Normally this is called after a HTTP GET. 24 * This method needs to be idempotent, this usually means that no data is written to the model. 25 * This method should be readonly, but may write data to the session. 26 * 27 * @return void 28 */ 29 public function view(); 30 31 /** 32 * Post action. 33 * 34 * Post action for writing data to the model (and the database). 35 * 36 * Normally this is called after a HTTP POST. 37 * 38 * @return void 39 */ 40 public function post(); 41 }