ElggPlugin::isStaticConfigValid PHP Method

isStaticConfigValid() private method

If a static config file is present, is it a serializable array?
private isStaticConfigValid ( ) : boolean
return boolean
    private function isStaticConfigValid()
    {
        if (!$this->canReadFile(ElggPluginPackage::STATIC_CONFIG_FILENAME)) {
            return true;
        }
        ob_start();
        $value = $this->includeFile(ElggPluginPackage::STATIC_CONFIG_FILENAME);
        if (ob_get_clean() !== '') {
            $this->errorMsg = _elgg_services()->translator->translate('ElggPlugin:activate:ConfigSentOutput');
            return false;
        }
        // make sure can serialize
        $value = @unserialize(serialize($value));
        if (!is_array($value)) {
            $this->errorMsg = _elgg_services()->translator->translate('ElggPlugin:activate:BadConfigFormat');
            return false;
        }
        return true;
    }