*/ class tao_install_checks_Opcache extends common_configuration_Component { /** * @return common_configuration_Report */ public function check() { $error = null; if (! function_exists('opcache_get_configuration')) { $error = 'You can install OPcache extension to improve performance'; } else { $configuration = opcache_get_configuration(); if (! $configuration['directives']['opcache.enable']) { $error = 'You can enable OPcache extension to improve performance'; } } $report = new common_configuration_Report( null !== $error ? common_configuration_Report::INVALID : common_configuration_Report::VALID, null !== $error ? $error : 'OPcache is installed', $this ); return $report; } }