3
3
4
4
/**
5
5
* @classname Service
6
- */
6
+ */
7
7
class Service {
8
8
9
9
public $ data , $ cache_id , $ cache_options , $ title , $ description , $ urlTemplate , $ username , $ total , $ method , $ callback_function , $ header_link , $ http_headers ;
10
10
private $ url , $ itemTemplate , $ tmpTemplate , $ boxTemplate , $ tmpBoxTemplate ;
11
11
12
12
/**
13
13
* @constructor
14
- */
14
+ */
15
15
public function __construct ( $ config =null ) {
16
16
PubwichLog::log ( 2 , sprintf ( Pubwich::_ ("Creating an instance of %s " ), get_class ( $ this ) ) );
17
17
18
18
$ this ->title = $ config ['title ' ];
19
19
$ this ->description = $ config ['description ' ];
20
20
21
- $ id = md5 ( $ this ->getURL () );
22
- $ this ->cache_id = $ id ;
21
+ $ id = md5 ( $ this ->getURL () );
22
+ $ this ->cache_id = $ id ;
23
23
24
24
if ( !$ this ->callback_function ) {
25
25
$ this ->callback_function = 'simplexml_load_string ' ;
26
26
}
27
27
28
- $ this ->cache_options = array (
29
- 'cacheDir ' => CACHE_LOCATION ,
28
+ $ this ->cache_options = array (
29
+ 'cacheDir ' => CACHE_LOCATION ,
30
30
'lifeTime ' => CACHE_LIMIT ,
31
31
'readControl ' => true ,
32
32
'readControlType ' => 'strlen ' ,
@@ -73,7 +73,7 @@ public function setURL( $url ) {
73
73
/**
74
74
* @param string $url
75
75
* @return Service
76
- */
76
+ */
77
77
public function init () {
78
78
PubwichLog::log ( 2 , sprintf ( Pubwich::_ ("Initializing instance of %s " ), get_class ( $ this ) ) );
79
79
$ url = $ this ->getURL ();
@@ -113,7 +113,7 @@ public function buildCache( $Cache_Lite = null ) {
113
113
114
114
/**
115
115
* @return string
116
- */
116
+ */
117
117
public function getData () {
118
118
return $ this ->data ;
119
119
}
@@ -166,7 +166,7 @@ public function getItemTemplate() {
166
166
public function setBoxTemplate ( $ template ) {
167
167
if ( !$ this ->boxTemplate ) {
168
168
$ this ->tmpBoxTemplate = $ template ;
169
- } else {
169
+ } else {
170
170
$ this ->boxTemplate ->setTemplate ( $ template );
171
171
}
172
172
}
@@ -205,7 +205,7 @@ public function renderBox( ) {
205
205
} else {
206
206
foreach ( $ classData as $ item ) {
207
207
$ compteur ++;
208
- if ($ this ->total && $ compteur > $ this ->total ) { break ; }
208
+ if ($ this ->total && $ compteur > $ this ->total ) { break ; }
209
209
$ populate = $ this ->populateItemTemplate ( $ item );
210
210
211
211
if ( function_exists ( get_class ( $ this ) . '_populateItemTemplate ' ) ) {
@@ -219,7 +219,7 @@ public function renderBox( ) {
219
219
220
220
$ data = array (
221
221
'class ' => $ htmlClass ,
222
- 'items ' => $ items
222
+ 'items ' => $ items
223
223
);
224
224
225
225
// Let the service override it
0 commit comments