/** * 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'; }
/** * 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(); }
/** * 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(); }
/** * 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); }
/** * 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); }
/** * 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; }
/** * 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(); }