[翻译]Joomla 1.5架构(四) common包
Base Folder
JObject
The JObject class is an abstract class that nearly all framework classes inherit from. It emulates PHP5 functionality in PHP4 and provides basic get/set methods on object fields.
JObject是几乎所有的框架类的基类,它实现了部分php4中没有的php5的功能,同时提供了对一些属性的基本GET/SET方法。
JObserver
JObserver is one of two abstract classes that implement the Observer design pattern. A class that extends JObserver is able to attach itself to a JObservable object and observe the state of the observable object. This is an equivalent of the JObserver object listening for an event fired by the JObservable class it is attached to.
实现观察者模式的两个抽象类之一,从观察者类扩展的类能够负载于一个观察对象,并且能够观察对象的状态变化,这相当于观察者对象接受由被观察对象触发的事件。
JObservable
JObservable is the abstract class that interacts with JObserver. It has a method to notify all JObserver objects observing it of an event or "state change".
观察者模式两个抽象类之一,于观察者对象交互。它可以通知所有观察者自己发生了状态改变。
Compatability Folder
This folder holds compatability files which are loaded as necessary depending upon the version of PHP executing the Joomla! script.
这个目录包含由于php版本不同而必须加载脚本文件。
Legacy Folder
This folder holds files which contain legacy code. Everything within this folder is deprecated and scheduled to be removed. It is provided only for backward compatability.
这个目录包含遗留代码,这个目录包含的文件即将被放弃或者已经过时了,仅仅是提供向后兼容行