Joomla 1.5架构(二) application包

来源:互联网 发布:知识发现与数据挖掘 编辑:程序博客网 时间:2024/05/02 01:53

application包中的类都是与main applicaiotn object 紧密联系的类,主要的类如下图

 

JApplication

This class represents the Joomla application and is implemented as a factory class providing all application held objects. The front-end JSite class, the admin JAdministrator class and the installation program JInstallation class all extend the JApplication class.

JApplication 类代表了 Joomla application 并且作为一个工厂类,生成所有application容纳的对象。前端表现的Jsite,管理类JAdministrator,以及处理安装的JInstall类都是JApplication的扩展类。

The class contains instances of: the registry (application persistent store); language object; session object; user object; pathway object; and the base URL (which is now derived and not in persistent store).

这个类包含了registry,language,session,user,pathway,URL等这些对象的实例。

JEventDispatcher

This is the Joomla! event dispatcher class. It implements the Observable and Singleton design patterns. It registers event handlers and triggers events.

这个类是Joomla时间分派类,它实现了观察者和单例模式,它注册事件处理钩子并且触发事件。

JPathWay

Instances of this class manage pathways (BreadCrumbs).

管理pathway的类(就是 home>文章分类>文章标题>*** 这部分表现的内容)

Environment Folder  Enviroment目录

JBrowser

Browser class, provides capability information about the current web client.   Browser identification is performed by examining the HTTP_USER_AGENT  environment variable provided by the web server. 

JBrowser类提供用户浏览器的信息,它根据 HTTP_USER_AGENT头信息确定浏览器。

JRequest

This class serves to provide the Joomla Framework with a common interface to access  request variables.  This includes $_POST, $_GET, and naturally $_REQUEST.  Variables  can be passed through an input filter to avoid injection or returned raw.

这个类主要用来提供一个所有request变量的方位接口,通过这个类,可以访问 $_POST,$_GET,$_REQUEST,这些变量通过一个输入过滤器,从而可以避免注射攻击。

JSession

Static class for managing HTTP sessions.  It provides access to session-state values as well as session-level settings and lifetime management methods. Based on the standard PHP session handling mechanism, it provides many more advanced features such as database container, idle and expire timeouts, etc. 

JSession是管理session的静态类,它提供了读取seesion状态值的读取,设置和生命周期的管理方法,基于标准php session的原理,它还提供一些数据库容器,空闲时间,过期设置等高级特征。

JURI

This class serves two purposes.  First to parse a URI and provide a common interface for the Joomla Framework to access and manipulate a URI.  Second to attain the URI of  the current executing script from the server regardless of server. The class is a Singlton.

单例,这个类有两个目的,其一是解析URI,并提供 framework一个通用的接口访问和操作URI,其二是从目前执行的脚本获得URI.(不是很清晰)

Extension Folder 

JModuleHelper

Instances of this class hold data on available modules

这个类的实例容纳模块的数据(这个类的实例可以调用模块,并生成数据,比如页面代码等等)

JPlugin

Instances of this class hold data on available plugins

插件类

JPluginHelper

Instances of this class hold data on available plugins

插件实例的操作类

User Folder 

JAuthenticate

This is the authorization class and it provides an interface for the Joomla authentication system. This is a singleton class. The login and logout functionality are included.

单例类,包含登录和推出的功能,它提供了Joomla认证系统的接口。

JAuthorization

The class that handles all access authorization.

认证类

JUser

This class handles all application interaction with a user. The class is a singleton.

用户类,是一个单例模式类,处理所有和用户信息相关的类