phpDocumentor GloryLands
Interface
[ class tree: GloryLands ] [ index: GloryLands ] [ all elements ]

Source for file form.php

Documentation is available at form.php

  1. <?php
  2. /**
  3.   * Predefined form structures
  4.   *
  5.   * <pre>
  6.   * GloryLands, a Web-Based, Massive Multiplayer Online RPG/Strategy Game
  7.   * Copyright (C) 2008-09  John Haralampidis <jïhnys2[at]gmail.cïm>
  8.   *
  9.   * This program is free software: you can redistribute it and/or modify
  10.   * it under the terms of the GNU General Public License as published by
  11.   * the Free Software Foundation, either version 3 of the License, or
  12.   * (at your option) any later version.
  13.   *
  14.   * This program is distributed in the hope that it will be useful,
  15.   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.   * GNU General Public License for more details.
  18.   *
  19.   * You should have received a copy of the GNU General Public License
  20.   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  21.   *
  22.   * For any help/suggestions or troubleshooting you can see the
  23.   * project community website at <http://www.glorylands.gr>
  24.   * </pre>
  25.   *
  26.   * @license GNU/GPLv3 GNU General Public License version 3
  27.   * @package GloryLands
  28.   * @subpackage Interface
  29.   * @author John Haralampidis <jïhnys2[at]gmail.cïm>
  30.   * @copyright Copyright (C) 2007-2009, John Haralampidis
  31.   * @version 1.0
  32.   */
  33.  
  34. /**
  35.   * Predefined form layout
  36.   *
  37.   * This template provides a predefined interface structure
  38.   *
  39.   * @todo Implement the static interrupts
  40.   * @package GloryLands
  41.   * @subpackage Interface
  42.   */
  43. class GLIForm extends GLSmartTemplate {
  44.  
  45.     // #@# Theoretical sheme:
  46.     /*        
  47.     public function handle_incoming_data($param, $vars) {
  48.         foreach ($this->children as $child) {
  49.             if ($child instanceof GLIFormElement) {
  50.                 if (isset($vars[$child->name])) {
  51.                     $child->value = $vars[$child->name];
  52.                 }
  53.             }
  54.         }
  55.     }
  56.     */
  57.     
  58.     public function __construct($file=NULL$id=NULL{
  59.         if (!$file$file=GLConfig::$resources->file('engine/interfaces/form.php');
  60.         
  61.         // Preinitialize variables
  62.         $this->action '';
  63.         $this->method 'get';
  64.         $this->vars = array();
  65.         
  66.         // Construct the element
  67.         parent::__construct($file$id);
  68.         
  69.         // #@# Theoretical sheme:        
  70.         // Register this class on a static interrupt, because
  71.         // we need this class to be intact when the request is
  72.         // being processed.
  73.         /*
  74.         GLInterrupts::register_static('request.data', $this, 'handle_incoming_data');
  75.         */
  76.     }
  77.         
  78. }
  79.  
  80. ?>

Documentation generated on Tue, 13 Oct 2009 23:48:54 +0300 by phpDocumentor 1.4.1