blob: cc991054570e9c6ee8f44c2fb9c2148c6cc91c30 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
class Loader {
static private $loader;
static function getLoader() {
if (null !== self::$loader) {
return self::$loader;
}
return self::$loader = new Loader();
}
static function getCounter() {
static $counter = 0;
return $counter++;
}
}
class ExtLoader extends Loader {
}
Loader::getLoader();
Loader::getCounter();
Loader::getCounter();
|