Esempio n. 1
0
 /**
  *    Creates the request packet to be sent by the form.
  *    @param SimpleTag $tag        Form tag to read.
  *    @return string               Packet class.
  *    @access private
  */
 function _setEncodingClass($tag) {
     if (strtolower($tag->getAttribute('method')) == 'post') {
         if (strtolower($tag->getAttribute('enctype')) == 'multipart/form-data') {
             return 'SimpleMultipartEncoding';
         }
         return 'SimplePostEncoding';
     }
     return 'SimpleGetEncoding';
 }
Esempio n. 2
0
 /**
  *    Starts with no held controls/widgets.
  *    @param SimpleTag $tag        Form tag to read.
  *    @param SimpleUrl $url        Location of holding page.
  */
 function SimpleForm($tag, $url)
 {
     $this->_method = $tag->getAttribute('method');
     $this->_action = $this->_createAction($tag->getAttribute('action'), $url);
     $this->_default_target = false;
     $this->_id = $tag->getAttribute('id');
     $this->_buttons = array();
     $this->_images = array();
     $this->_widgets = array();
 }
Esempio n. 3
0
 /**
  *    Starts with no held controls/widgets.
  *    @param SimpleTag $tag        Form tag to read.
  */
 function SimpleForm($tag) {
     $this->_method = $tag->getAttribute('method');
     $this->_action = $tag->getAttribute('action');
     $this->_id = $tag->getAttribute('id');
     $this->_buttons = array();
     $this->_images = array();
     $this->_widgets = array();
 }
Esempio n. 4
0
 /**
  *    Sets the base url for the page.
  *    @param SimpleTag $tag    Base URL for page.
  *    @access protected
  */
 function _setBase(&$tag)
 {
     $url = $tag->getAttribute('href');
     $this->_base = new SimpleUrl($url);
 }
Esempio n. 5
0
 /**
  *    Sets the base url for the page.
  *    @param SimpleTag $tag    Base URL for page.
  *    @access protected
  */
 protected function setBase($tag)
 {
     $url = $tag->getAttribute('href');
     $this->base = new SimpleUrl($url);
 }
Esempio n. 6
0
 /**
  *  Fills the widget cache to speed up searching.
  *  @param SimpleTag $widget    Parsed widget to cache.
  */
 private function indexWidgetById($widget)
 {
     $id = $widget->getAttribute('id');
     if (!$id) {
         return;
     }
     if (!isset($this->widgets_by_id[$id])) {
         $this->widgets_by_id[$id] = array();
     }
     $this->widgets_by_id[$id][] = $widget;
 }
Esempio n. 7
0
 /**
  *    Starts with no held controls/widgets.
  *    @param SimpleTag $tag        Form tag to read.
  */
 function SimpleForm($tag)
 {
     $this->_method = $tag->getAttribute("method");
     $this->_action = $tag->getAttribute("action");
     $this->_id = $tag->getAttribute("id");
     $this->_buttons = array();
     $this->_widgets = array();
 }