8383class HTMLPurifier
8484{
8585
86- var $ version = '2.1.3 ' ;
86+ public $ version = '2.1.3 ' ;
8787
88- var $ config ;
89- var $ filters = array ();
88+ public $ config ;
89+ public $ filters = array ();
9090
91- var $ strategy , $ generator ;
91+ protected $ strategy , $ generator ;
9292
9393 /**
9494 * Resultant HTMLPurifier_Context of last run purification. Is an array
9595 * of contexts if the last called method was purifyArray().
9696 * @public
9797 */
98- var $ context ;
98+ public $ context ;
9999
100100 /**
101101 * Initializes the purifier.
@@ -105,7 +105,7 @@ class HTMLPurifier
105105 * The parameter can also be any type that
106106 * HTMLPurifier_Config::create() supports.
107107 */
108- function HTMLPurifier ($ config = null ) {
108+ public function HTMLPurifier ($ config = null ) {
109109
110110 $ this ->config = HTMLPurifier_Config::create ($ config );
111111
@@ -118,7 +118,7 @@ function HTMLPurifier($config = null) {
118118 * Adds a filter to process the output. First come first serve
119119 * @param $filter HTMLPurifier_Filter object
120120 */
121- function addFilter ($ filter ) {
121+ public function addFilter ($ filter ) {
122122 $ this ->filters [] = $ filter ;
123123 }
124124
@@ -132,7 +132,7 @@ function addFilter($filter) {
132132 * that HTMLPurifier_Config::create() supports.
133133 * @return Purified HTML
134134 */
135- function purify ($ html , $ config = null ) {
135+ public function purify ($ html , $ config = null ) {
136136
137137 $ config = $ config ? HTMLPurifier_Config::create ($ config ) : $ this ->config ;
138138
@@ -198,7 +198,7 @@ function purify($html, $config = null) {
198198 * See HTMLPurifier::purify() for more details.
199199 * @return Array of purified HTML
200200 */
201- function purifyArray ($ array_of_html , $ config = null ) {
201+ public function purifyArray ($ array_of_html , $ config = null ) {
202202 $ context_array = array ();
203203 foreach ($ array_of_html as $ key => $ html ) {
204204 $ array_of_html [$ key ] = $ this ->purify ($ html , $ config );
@@ -213,10 +213,10 @@ function purifyArray($array_of_html, $config = null) {
213213 * @param $prototype Optional prototype HTMLPurifier instance to
214214 * overload singleton with.
215215 */
216- function &getInstance ($ prototype = null ) {
216+ public static function &getInstance ($ prototype = null ) {
217217 static $ htmlpurifier ;
218218 if (!$ htmlpurifier || $ prototype ) {
219- if (is_a ( $ prototype, ' HTMLPurifier ' ) ) {
219+ if ($ prototype instanceof HTMLPurifier) {
220220 $ htmlpurifier = $ prototype ;
221221 } elseif ($ prototype ) {
222222 $ htmlpurifier = new HTMLPurifier ($ prototype );
0 commit comments