Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PageSpecial {
- protected $value;
- private static $instances = array();
- protected function __construct($value) {
- $this->value = $value;
- }
- function __toString() {
- return $this->value;
- }
- static function conditions() {
- if (!isset($instances[__FUNCTION__])) {
- $instances[__FUNCTION__] = new self(__FUNCTION__);
- }
- return $instances[__FUNCTION__];
- }
- static function home() {
- if (!isset($instances[__FUNCTION__])) {
- $instances[__FUNCTION__] = new self(__FUNCTION__);
- }
- return $instances[__FUNCTION__];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement