1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 05:07:55 +02:00

Convert to PHP 5 only codebase, adding visibility modifiers to all members and methods in the main library area (function only for test methods)

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1458 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-11-25 02:24:39 +00:00
parent 85a23bacb6
commit 43f01925cd
195 changed files with 1003 additions and 1064 deletions

View File

@@ -26,21 +26,20 @@ HTMLPurifier_ConfigSchema::defineAlias(
class HTMLPurifier_DefinitionCacheFactory
{
var $caches = array('Serializer' => array());
var $decorators = array();
protected $caches = array('Serializer' => array());
protected $decorators = array();
/**
* Initialize default decorators
*/
function setup() {
public function setup() {
$this->addDecorator('Cleanup');
}
/**
* Retrieves an instance of global definition cache factory.
* @static
*/
function &instance($prototype = null) {
public static function &instance($prototype = null) {
static $instance;
if ($prototype !== null) {
$instance = $prototype;
@@ -56,7 +55,7 @@ class HTMLPurifier_DefinitionCacheFactory
* @param $name Name of definitions handled by cache
* @param $config Instance of HTMLPurifier_Config
*/
function &create($type, $config) {
public function &create($type, $config) {
// only one implementation as for right now, $config will
// be used to determine implementation
$method = $config->get('Cache', 'DefinitionImpl');
@@ -82,7 +81,7 @@ class HTMLPurifier_DefinitionCacheFactory
* Registers a decorator to add to all new cache objects
* @param
*/
function addDecorator($decorator) {
public function addDecorator($decorator) {
if (is_string($decorator)) {
$class = "HTMLPurifier_DefinitionCache_Decorator_$decorator";
$decorator = new $class;