文档类,提供一个容易的接口解析和显示文件
Method Description
__construct 构造函数
addScript 增加一个连接到页
addScriptDeclaration 增加脚本到页
addStyleDeclaration 增加一个stylesheet声明到页
addStyleSheet 增加一连接的stylesheet到页
getBase 返回本文的基本URI
getBuffer 得到本文缓冲的内容
getCharset 返回本文charset 内码
getDescription 返回页的标题
getDirection 返回文件语言
getGenerator 返回文档创建者
getHeadData 得到本文头数据
getInstance 返回在全局 JDocument对象
getLanguage 得到语言.
getLink 得到文档的URL
getMetaData 得到meta标签
getTitle 得到文档标题
getType 得到文档类型
loadRenderer 随机装载
render 输出文档
setBase 设置文档的e基本URI
setBuffer 设置本文缓冲的内容
setCharset 设置本文charset
setDescription 设置本文的描述
setDirection 设置全局文件声明。 缺省左到右(ltr)。
setGenerator 设置文本创建者
setHeadData 设置文本头信息
setLanguage 设置语言.
setLineEnd 设置线结尾样式对Windows、Mac、Unix或者自定义串。
setLink 设置文档链接
setMetaData 设置metai标签
setMimeEncoding 设置被送到浏览器的本文MIME内码
setModifiedData 定本文修改过的日期
setTab 设置串被用于内嵌HTML
setTitle 设置文档标题
setType 设置文档类型.
方法应用:
addScript()
意义:增加一个连接到页
语法:void addScript (string $url, [string $type = "text/javascript"])
string $url: URL to the linked script
string $type: Type of script. Defaults to 'text/javascript'
实际应用:
$temp =& Jfactory::getDocument();
$temp->addscript(JURI::base().'includes/js/overlib_mini.js');
结果:在head部分插入一段js
addScriptDeclaration()
意义:增加脚本到页头
语法:void addScriptDeclaration (string $content, [string $type = 'text/javascript'])
string $content: Script
string $type: Scripting mime (defaults to 'text/javascript')
实际应用:
$temp =& Jfactory::getDocument();
$script = "alert( 'A script has been added to the page!' );";
$temp->addScriptDeclaration($scirpt);
getBase()
意义:返回本文的基本URI
语法:string getBase ()
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->getBase();
getBuffer()
意义:得到本文缓冲的内容
语法: getBuffer ()
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->getBuffer();
getInstance()
意义:返回在全局JDocument对象
语法:object The &getInstance ([type $type = 'html'], [ $attributes = array()])
type $type: The document type to instantiate
$attributes
实际应用:
$temp =& Jfactory::getDocument();
$temp->getInstance('html'); //生成jdocumenthtml对象.
$temp->getInstance('error');//生成 jdocumenterror对象.
$temp->getInstance('feed');//生成 jdocumentfeed对象.
setBuffer()
意义:设置本文缓冲的内容
语法:void setBuffer (string $content)
string $content: The content to be set in the buffer
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setBuffer();
setDirection()
意义: 设置全局文件声明。 缺省左到右(ltr)。
语法:void setDirection ([ $dir = "ltr"], string $lang)
string $lang
$dir
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setDirection();
setGenerator()
意义: 设置文本创建者
语法:void setGenerator (string $generator)
string $generator
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setGenerator();
setHeadData()
意义: 设置文本头信息
语法:void setHeadData (array $data)
array $data: The document head data in array form
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setHeadData();
setLanguage()
意义: 设置语言
语法:void setLanguage ([string $lang = "en-gb"])
string $lang
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setLanguage();
setLineEnd()
意义: 设置线结尾样式对Windows、Mac、Unix或者自定义串。
语法:void setLineEnd (string $style)
string $style: "win", "mac", "unix" or custom string.
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setLineEnd();
setLink()
意义: 设置文档链接
语法:void setLink (string $url)
string $url: A url
实际应用:
$temp =& Jfactory::getDocument();
$link=”www.joomla.org”;
$temp->setLink($link);
setMetaData()
意义: 设置meta标签
语法:void setMetaData (string $name, string $content, [bool $http_equiv = false])
string $name: Value of name or http-equiv tag
string $content: Value of the content tag
bool $http_equiv: META type "http-equiv" defaults to null
实际应用:
$temp =& Jfactory::getDocument();
$temp->setMetaData('Publisher', 'joomla! Documentation Team!');
result:
<meta name="Publisher" content="Joomla! Documentation Team" />
setMimeEncoding()
意义: 设置被送到浏览器的本文MIME内码
语法:void setMimeEncoding ([string $type = 'text/html'])
string $type.
实际应用:
$temp =& Jfactory::getDocument();
$temp->setMimrEncoding('application/xml'));
setModifiedDate()
意义: 定本文修改过的日期
语法:void setModifiedDate (string $date)
string $date
实际应用:
$temp =& Jfactory::getDocument();
$temp->setModifiedDate($date));
Method Description
__construct 构造函数
addScript 增加一个连接到页
addScriptDeclaration 增加脚本到页
addStyleDeclaration 增加一个stylesheet声明到页
addStyleSheet 增加一连接的stylesheet到页
getBase 返回本文的基本URI
getBuffer 得到本文缓冲的内容
getCharset 返回本文charset 内码
getDescription 返回页的标题
getDirection 返回文件语言
getGenerator 返回文档创建者
getHeadData 得到本文头数据
getInstance 返回在全局 JDocument对象
getLanguage 得到语言.
getLink 得到文档的URL
getMetaData 得到meta标签
getTitle 得到文档标题
getType 得到文档类型
loadRenderer 随机装载
render 输出文档
setBase 设置文档的e基本URI
setBuffer 设置本文缓冲的内容
setCharset 设置本文charset
setDescription 设置本文的描述
setDirection 设置全局文件声明。 缺省左到右(ltr)。
setGenerator 设置文本创建者
setHeadData 设置文本头信息
setLanguage 设置语言.
setLineEnd 设置线结尾样式对Windows、Mac、Unix或者自定义串。
setLink 设置文档链接
setMetaData 设置metai标签
setMimeEncoding 设置被送到浏览器的本文MIME内码
setModifiedData 定本文修改过的日期
setTab 设置串被用于内嵌HTML
setTitle 设置文档标题
setType 设置文档类型.
方法应用:
addScript()
意义:增加一个连接到页
语法:void addScript (string $url, [string $type = "text/javascript"])
string $url: URL to the linked script
string $type: Type of script. Defaults to 'text/javascript'
实际应用:
$temp =& Jfactory::getDocument();
$temp->addscript(JURI::base().'includes/js/overlib_mini.js');
结果:在head部分插入一段js
addScriptDeclaration()
意义:增加脚本到页头
语法:void addScriptDeclaration (string $content, [string $type = 'text/javascript'])
string $content: Script
string $type: Scripting mime (defaults to 'text/javascript')
实际应用:
$temp =& Jfactory::getDocument();
$script = "alert( 'A script has been added to the page!' );";
$temp->addScriptDeclaration($scirpt);
getBase()
意义:返回本文的基本URI
语法:string getBase ()
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->getBase();
getBuffer()
意义:得到本文缓冲的内容
语法: getBuffer ()
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->getBuffer();
getInstance()
意义:返回在全局JDocument对象
语法:object The &getInstance ([type $type = 'html'], [ $attributes = array()])
type $type: The document type to instantiate
$attributes
实际应用:
$temp =& Jfactory::getDocument();
$temp->getInstance('html'); //生成jdocumenthtml对象.
$temp->getInstance('error');//生成 jdocumenterror对象.
$temp->getInstance('feed');//生成 jdocumentfeed对象.
setBuffer()
意义:设置本文缓冲的内容
语法:void setBuffer (string $content)
string $content: The content to be set in the buffer
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setBuffer();
setDirection()
意义: 设置全局文件声明。 缺省左到右(ltr)。
语法:void setDirection ([ $dir = "ltr"], string $lang)
string $lang
$dir
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setDirection();
setGenerator()
意义: 设置文本创建者
语法:void setGenerator (string $generator)
string $generator
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setGenerator();
setHeadData()
意义: 设置文本头信息
语法:void setHeadData (array $data)
array $data: The document head data in array form
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setHeadData();
setLanguage()
意义: 设置语言
语法:void setLanguage ([string $lang = "en-gb"])
string $lang
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setLanguage();
setLineEnd()
意义: 设置线结尾样式对Windows、Mac、Unix或者自定义串。
语法:void setLineEnd (string $style)
string $style: "win", "mac", "unix" or custom string.
实际应用:
$temp =& Jfactory::getDocument();
echo $temp->setLineEnd();
setLink()
意义: 设置文档链接
语法:void setLink (string $url)
string $url: A url
实际应用:
$temp =& Jfactory::getDocument();
$link=”www.joomla.org”;
$temp->setLink($link);
setMetaData()
意义: 设置meta标签
语法:void setMetaData (string $name, string $content, [bool $http_equiv = false])
string $name: Value of name or http-equiv tag
string $content: Value of the content tag
bool $http_equiv: META type "http-equiv" defaults to null
实际应用:
$temp =& Jfactory::getDocument();
$temp->setMetaData('Publisher', 'joomla! Documentation Team!');
result:
<meta name="Publisher" content="Joomla! Documentation Team" />
setMimeEncoding()
意义: 设置被送到浏览器的本文MIME内码
语法:void setMimeEncoding ([string $type = 'text/html'])
string $type.
实际应用:
$temp =& Jfactory::getDocument();
$temp->setMimrEncoding('application/xml'));
setModifiedDate()
意义: 定本文修改过的日期
语法:void setModifiedDate (string $date)
string $date
实际应用:
$temp =& Jfactory::getDocument();
$temp->setModifiedDate($date));
发表评论
-
joomla 模块modules开发教程
2010-05-12 14:16 2764模块是页面扩展轻量级方式,相对组件更为灵活。模块通常用来做页面 ... -
[翻译] Joomla XML 解析器规范 上
2010-04-22 14:45 1045概述 Joomla! 1.5 新增 JSimpleXML 类 ... -
Joomla插件开发规范
2010-04-22 14:44 1380概述:JPlugin Joomla 1.5的新功能 为了更好 ... -
joomla源代码探析续(三十一) JHTML 类常用的方法
2010-04-22 14:37 1716我曾经在几篇文章中涉及到JHTML的方法使用,这里不再说了,请 ... -
joomla源代码探析续(三十) JDate类参考
2010-04-22 14:36 1044JDate类与JString类一样是Joomla!中的基础类, ... -
joomla源代码探析续(二十九) JHTML 与JHTMLSelect 类的使用
2010-04-22 14:33 1171我们在form表单生成的过程中,经常需要有select 标签或 ... -
joomla源代码探析续(二十八) 如何扩展JTable类
2010-04-22 14:30 1029JTable类是Active Record设计模式(web应用 ... -
joomla源代码探析续(二十七)组件后台如何设置参数
2010-04-22 14:29 894以下的方法可以在管理后台中添加一个Parameters设置的按 ... -
joomla源代码探析续(二十六)JUser对象和用户权限判断
2010-04-22 14:23 1831每一个访问Joomla网站的用户都对应这一个JUser对象,通 ... -
joomla源代码探析续(二十五)JRequest对象的变量获取过程
2010-04-22 14:22 1163Joomla 1.5 RC3版本的SEF存在不少问题,前段时间 ... -
joomla源代码探析续(二十四)JPagination类
2010-04-22 14:22 1099JPagination类是Joomla的通用分页功能的封装类, ... -
Joomla源代码解析(二十二) 模块是如何被调用执行并渲染(下)
2010-04-22 14:16 930上一文章中提到了getBuffer函数,在函数中实际上调用了r ... -
模块是如何被调用执行并渲染?
2010-04-22 14:12 816以前的文章中,关于/index.php我们已经分析完了 $ma ... -
Joomla源代码解析(二十) MVC组件的执行
2010-04-22 14:10 906以前的文章中,我们曾经说过 $mainframework-&g ... -
Joomla源代码解析(十九) JController
2010-04-22 14:05 871同样 JController 是MVC中重要的起点,正式这个类 ... -
Joomla源代码解析(十八) Jview
2010-04-22 14:03 937MVC模式中,重要的一环,JView 和 tmpl目录中的模板 ... -
Joomla源代码解析(十六) JTable是什么 不指定
2010-04-22 14:01 1434JTable是什么? JTable是数据库中数据表在程序中的表 ... -
Joomla源代码解析(十五) 组件是如何被调用并渲染的
2010-04-22 14:00 1415Joomla代码中, 组件是如 ... -
Joomla源代码解析(十四) JRequest类 不指定
2010-04-22 13:58 849这是另一个Joomla扩展中最常用的类,这个类封装了客户端提交 ... -
Joomla源代码解析(十三) JText类
2010-04-22 11:25 1201Joomla 最常用的类之一,使用方式JTEXT::_('JJ ...
相关推荐
joomla 1.5安装方法 第三单元 前台内容 第三单元 前台内容? 第三单元 后台 Joomla 管理配置! 帮助菜单 网站菜单 用户管理器 编辑用户 添加新用户 媒体管理器 全局配置 用户 内容 服务 注销 主菜单 菜单管理器 主...
zmax程序人 将Joomla1.5版本的模板移植到Joomla2.5上的经验总结
Joomla1.5的中文框架,包括详细的安装说明等。
joomla1.5使用教程+-+中文手册.pdf
Joomla1.5模板
最新版针对 joomla 1.5的教程 Building Websites with Joomla 1.5 强烈推荐
详细介绍了Joomla 1.5 SEO Patch的文件结构与安装,同时也简要的介绍了搜索引擎优化原理以及相关的SEO设定。
joomla 1.5 备份使用,支持Joomla 1.5的备份上传工具。
joomla 1.5留言本easybook
joomla1.5中文语言包,解压缩后就可以直接使用
Joomla 1.0 升级到 Joomla 1.5 用的组件 [migrator] 描述 默认joomla 35个表, 如果你装其他com.....则需要这个组件对应的插件! 在joomla 1.0里安装,生成sql 然后下载.... 在你安装 joomla 1.5的时候, 在安装示例...
joomla1.5中文语言包(管理后台)
Joomla1.5系列组件开发经典教程 Joomla1.5快速开发应用,模块开发 非常适合企业个人开发建站
迁移你旧的Joomla 1.5网站数据库到Joomla 2.5~3.x的数据库里。 https://extensions.joomla.org/extensions/extension/migration-a-conversion/joomla-migration/sp-upgrade/ SP Upgrade supports transferring ...
比较详细的分析joomla1.5源码。可以对应着源码一起学习
Building Websites with Joomla 1.5
自我感觉不错的joomla1.5模板安装包!发上来和大家分享一下!
Joomla 1.5.x 数据库布局图.png
mod_hot_weather(Joomla 1.5)
易于安装和升级使用 Joomla !扩展管理器。配置集成到管理页面的Joomla!。整合与CKFinder,简单的文件浏览上传下载 。简单的自定义拖放工具栏。内置链接浏览器直接链接到您的Joomla的元素。始终最新的 CKEditor版本...