本文整理汇总了PHP中SimpleTag::getAttribute方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleTag::getAttribute方法的具体用法?PHP SimpleTag::getAttribute怎么用?PHP SimpleTag::getAttribute使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleTag
的用法示例。
在下文中一共展示了SimpleTag::getAttribute方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* 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';
}
示例2: SimpleForm
/**
* 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();
}
示例3: SimpleForm
/**
* 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();
}
示例4: SimpleUrl
/**
* 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);
}
示例5: setBase
/**
* 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);
}
示例6: indexWidgetById
/**
* 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;
}
示例7: SimpleForm
/**
* 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();
}