public function __construct($prefIn = 'CACHE_', $init_mode = false) { if (!($init_mode === false || $init_mode === CACHER_NO_CACHE || $init_mode === CACHER_XCACHE && extension_loaded('xcache'))) { throw new UnexpectedValueException('Wrong work mode or current mode does not supported on your server'); } $this->prefix = $prefIn; if (extension_loaded('xcache') && ($init_mode === CACHER_XCACHE || $init_mode === false)) { if (self::$mode === CACHER_NOT_INIT) { self::$mode = CACHER_XCACHE; } } else { if (self::$mode === CACHER_NOT_INIT) { self::$mode = CACHER_NO_CACHE; if (!self::$data) { self::$data = array(); } } } }