Check if asynchronous backup and restore mode is
enabled at system level.

@return bool $async True if async mode enabled false otherwise.
421745
static public function is_async_enabled() {
        global $CFG;

        $async = false;
        if (!empty($CFG->enableasyncbackup)) {
            $async = true;
        }

        return $async;
    }
1141138
public function afterBootingApplication()
    {
        if (!$this->activateEventMiddleWare()) {
            return false;
        }

        if ($this->container->get('event')->isAppEventEnabled() == false) {
            return true;
        }
        return $this->container->get('event')->trigger('afterBootingApplication', $this->container);
    }
464867
public function isSuccessful()
    {
        if ($this->getState() === static::STATE_NOT_RUNNING) {
            foreach ($this->items as $run) {
                if (!$run->isSuccessful()) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }
703190
protected function isPatchingEnabled()
    {
        $enabled = true;

        $has_no_patches = empty($extra['patches']);
        $has_no_patches_file = ($this->getConfig('patches-file') === '');
        $patching_disabled = $this->getConfig('disable-patching');

        if ($patching_disabled || !($has_no_patches && $has_no_patches_file)) {
            $enabled = false;
        }

        return $enabled;
    }
932834
public function check(): bool
  {
    if ( $this->current !== null ){
      // if $on_error is set to E_CONTINUE returns true
      if ( $this->on_error === self::E_CONTINUE ){
        return true;
      }
      // If any connection has an error with mode E_STOP_ALL
      if ( self::$has_error_all && ($this->on_error !== self::E_STOP_ALL) ){
        return false;
      }
      // If this connection has an error with mode E_STOP
      if ( $this->has_error && ($this->on_error !== self::E_STOP) ){
        return false;
      }
      return true;
    }
    return false;
  }
576057
static function isCacheEnabled()
    {
        if ( isset( $GLOBALS['eZSiteBasics'] ) )
        {
            $siteBasics = $GLOBALS['eZSiteBasics'];
            if ( isset( $siteBasics['no-cache-adviced'] ) and
                 $siteBasics['no-cache-adviced'] )
            {
                return false;
            }
        }

        $ini = eZINI::instance();
        $cacheEnabled = $ini->variable( 'TemplateSettings', 'NodeTreeCaching' ) == 'enabled';
        return $cacheEnabled;
    }
101825
public function hasAnsiSupport(): bool
	{
		if($this->hasAnsiSupport === null)
		{
			$this->hasAnsiSupport = PHP_OS_FAMILY !== 'Windows' || (getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON');
		}

		return $this->hasAnsiSupport;
	}
768070
protected static function hasStaleCacheFile()
    {
        $composerTravisLintCache = getcwd()
            . DIRECTORY_SEPARATOR
            . self::CTL_CACHE;

        $travisConfiguration = getcwd()
            . DIRECTORY_SEPARATOR
            . self::TRAVIS_CONFIGURATION;

        if (file_exists($composerTravisLintCache) && file_exists($travisConfiguration)) {
            $travisConfigurationContent = trim(file_get_contents($travisConfiguration));
            $composerTravisLintCacheContent = trim(file_get_contents($composerTravisLintCache));

            if (md5($travisConfigurationContent) === $composerTravisLintCacheContent) {
                return false;
            }
        }

        return true;
    }
1297084
public function isAlive()
    {
        if ($this->getStatus() == Aoe_Scheduler_Model_Schedule::STATUS_RUNNING) {
            if (time() - strtotime($this->getLastSeen()) < 2 * 60) { // TODO: make this configurable
                return true;
            } elseif ($this->getHost() == gethostname()) {
                if ($this->checkPid()) {
                    $this
                        ->setLastSeen(strftime('%Y-%m-%d %H:%M:%S', time()))
                        ->save();
                    return true;
                } else {
                    $this->markAsDisappeared(sprintf('Process "%s" on host "%s" cannot be found anymore', $this->getPid(), $this->getHost()));
                    return false; // dead
                }
            } else {
                // we don't know because the task is running on a different server
                return null;
            }
        }
        return false;
    }
747306
public function enabled() {
		if (!parent::enabled()) {
			return false;
		}

		if (StorageManager::driver() != 's3') {
			return false;
		}

		if (empty($this->region) || empty($this->key) || empty($this->secret)) {
			return false;
		}

		$client = StorageManager::storageInstance();
		if (!$client->enabled()) {
			return false;
		}

		return ($this->detectLabels || $this->detectFaces || $this->detectExplicit || $this->detectCelebrities);
	}
647371
public static function isAuditingEnabled(): bool
    {
        if (App::runningInConsole()) {
            return Config::get('audit.console', false);
        }

        return Config::get('audit.enabled', true);
    }
581203
public function enableCaching()
    {
        if (FileSystemHelper::folderExists($this->getCacheDir())) {
            $this->caching = true;
            return true;
        }
        return false;
    }
421801
private function hasToBeReloaded()
    {
        if (!$this->getWurflConfig()->allowReload) {
            return false;
        }

        $state = $this->getPersistenceStorage()->load(self::WURFL_API_STATE);

        return !$this->isStateCurrent($state);
    }
273654
public boolean isSyncEnabled() {

        CmsSynchronizeSettings syncSettings = getSettings().getUserSettings().getSynchronizeSettings();
        return (syncSettings != null) && syncSettings.isSyncEnabled();
    }
1320843
protected function prepareSync()
    {
        if (!empty($this->statusSync)) {
            return $this->statusSync;
        }
        LoggerFactory::$file = $this->config['logFile'];
        LoggerFactory::$level = $this->config['logLevel'];
        $this->statusSync = $this->getStatusSync();
        $this->statusSync->setDefaults();
        $this->statusSync->cacheDir = $this->config['cacheDir'];
        $this->statusSync->refreshInterval = $this->config['statusRefresh'];
        if (!empty($this->config['statusUrl'])) {
            $this->statusSync->registerUrl($this->config['statusUrl'], true);
        }

        return $this->statusSync;
    }
604408
public function getCacheIsReady(): bool
    {
        foreach ($this->caches as $cache) {
            if (!$cache->getCacheIsReady()) {
                return false;
            }
        }

        return true;
    }
594728
public static function enabled() {
		$loaded = extension_loaded('apc');
		$isCli = (php_sapi_name() === 'cli');
		$enabled = (!$isCli && ini_get('apc.enabled')) || ($isCli && ini_get('apc.enable_cli'));
		return ($loaded && $enabled);
	}