CacheEngine::isSupported PHP Метод

isSupported() абстрактный публичный Метод

Returns true if the engine was supported in PHP, false otherwise.
abstract public isSupported ( ) : boolean
Результат boolean
    public abstract function isSupported();

Usage Example

Пример #1
0
    /**
     * CampCache class constructor.
     *
     */
    private function __construct($p_cacheEngine)
    {
        global $Campsite;

        if (empty($p_cacheEngine)) {
            return;
        }

        $this->m_cacheEngine = CacheEngine::Factory($p_cacheEngine);
        if (is_null($this->m_cacheEngine) || !$this->m_cacheEngine->isSupported()) {
            self::$m_enabled = false;
            SystemPref::Set('DBCacheEngine', '');
            CampSession::singleton()->setData('system_preferences', null, 'default', true);
            return;
        } else {
            self::$m_enabled = true;
        }

        if (isset($Campsite['CAMP_SECRET'])) {
            $this->m_secret = $Campsite['CAMP_SECRET'];
        } else {
            $this->m_secret = $Campsite['DATABASE_USER']
                .$Campsite['DATABASE_NAME']
                .$Campsite['DATABASE_SERVER_ADDRESS']
                .$Campsite['WWW_DIR'];
        }
    } // fn __construct
All Usage Examples Of CacheEngine::isSupported