Returns true if $wurflConfig specifies a Logger
@param WURFL_Configuration_Config $wurflConfig
@return bool
161003
private static function isLoggingConfigured($wurflConfig)
    {
        if (is_null($wurflConfig)) {
            return false;
        }
        return !is_null($wurflConfig->logDir) && is_writable($wurflConfig->logDir);
    }
92541
public function isLoggedIn()
    {
        $isSimulatedLoggedIn = ($this->loggedInUser !== null);
        $isReallyLoggedIn = $this->getFrontEndController() !== null && $this->getFrontEndController()->loginUser;

        return $isSimulatedLoggedIn || $isReallyLoggedIn;
    }
472025
public function hasConfigsFactory() {
		if ($this->_configsFactory !== null) {
			return true;
		}
		
		if ($this instanceof LocatorAwareInterface && $this->hasLocator()
			&& $this->getLocator()->has('configsFactory')) {
			return true;
		}
		
		return false;
	}
294508
protected function _applyConfig($config)
    {
        if (is_string($config)) {
            $name = $config;
            $config = static::getConfig($name);
            if (empty($config)) {
                throw new InvalidArgumentException(sprintf('Unknown email configuration "%s".', $name));
            }
            unset($name);
        }

        $this->_profile = array_merge($this->_profile, $config);

        $simpleMethods = [
            'from', 'sender', 'to', 'replyTo', 'readReceipt', 'returnPath',
            'cc', 'bcc', 'messageId', 'domain', 'subject', 'attachments',
            'transport', 'emailFormat', 'emailPattern', 'charset', 'headerCharset'
        ];
        foreach ($simpleMethods as $method) {
            if (isset($config[$method])) {
                $this->{'set' . ucfirst($method)}($config[$method]);
            }
        }

        if (empty($this->headerCharset)) {
            $this->headerCharset = $this->charset;
        }
        if (isset($config['headers'])) {
            $this->setHeaders($config['headers']);
        }

        $viewBuilderMethods = [
            'template', 'layout', 'theme'
        ];
        foreach ($viewBuilderMethods as $method) {
            if (array_key_exists($method, $config)) {
                $this->viewBuilder()->{'set' . ucfirst($method)}($config[$method]);
            }
        }

        if (array_key_exists('helpers', $config)) {
            $this->viewBuilder()->setHelpers($config['helpers'], false);
        }
        if (array_key_exists('viewRender', $config)) {
            $this->viewBuilder()->setClassName($config['viewRender']);
        }
        if (array_key_exists('viewVars', $config)) {
            $this->set($config['viewVars']);
        }
    }
1317647
protected function checkHasRequestedNameConfig($config, $requestedName)
    {
        if (isset($config[$requestedName]) && is_array($config[$requestedName]) && !empty($config[$requestedName])) {
            return true;
        }
        return false;
    }
533855
private boolean isLogConfigurationMessage(Throwable ex) {
		if (ex instanceof InvocationTargetException) {
			return isLogConfigurationMessage(ex.getCause());
		}
		String message = ex.getMessage();
		if (message != null) {
			for (String candidate : LOG_CONFIGURATION_MESSAGES) {
				if (message.contains(candidate)) {
					return true;
				}
			}
		}
		return false;
	}
1215233
protected function configureHandlers( Framework $fw, $handler, Logger $log )
	{
		switch ( strtolower( $handler ) )
		{
			case "single":
			{
				$log->useFiles( $fw->buildPath( '__logs', 'http.log' ), Config::get( 'app.log_level', 'debug' ) );
				break;
			}
			case "daily":
			{
				$maxFiles = Config::get( 'app.log_max_files' );
				$log->useDailyFiles( $fw->buildPath( '__logs', 'http.log' ), is_null( $maxFiles ) ? 5 : $maxFiles, Config::get( 'app.log_level', 'debug' ) );
				break;
			}
			case "syslog":
			{
				$log->useSyslog( 'framework', Config::get( 'app.log_level', 'debug' ) );
				break;
			}
			case "errorlog":
			{
				$log->useErrorLog( Config::get( 'app.log_level', 'debug' ) );
				break;
			}
			default:
				throw new FrameworkException( "The string [" . $handler . "] is not a valid log handler." );
		}
	}
408231
private boolean isPluginConfiguration(Configuration configuration) {
		return (configuration.containsKey(ID_KEY) && getPluginId() == configuration.getInt(ID_KEY))
				// To keep backwards compatibility check also the classname
				|| getClass().getCanonicalName().equals(configuration.getString(CLASSNAME_KEY, ""));
	}
441343
public function loadConfig($config = null)
    {
        $config =
            !is_null($config) || !file_exists($this->configFile)
                ? $this->setConfigFile($this->getConfigFile($config))
                : $this->configFile;

        return $this->loadToLaravelConfig($config);
    }
971390
protected function _assignRole($config)
    {
        if (!is_array($config)) {
            return false;
        }
        if (!$name = ArrayHelper::getValue($config, 'name')) {
            return false;
        }
        if (!$child = ArrayHelper::getValue($config, 'child')) {
            return false;
        }
        if (!$role = \Yii::$app->authManager->getRole($name)) {
            return false;
        }
        if ($childRoles = ArrayHelper::getValue($child, 'roles')) {
            if ($childRoles) {
                foreach ($childRoles as $name) {
                    if ($roleChild = \Yii::$app->authManager->getRole($name)) {
                        try {
                            \Yii::$app->authManager->addChild($role, $roleChild);
                            $this->stdout("\t\tassign child role: " . $name . ' - success' . "\n", Console::FG_GREEN);
                        } catch (\Exception $e) {
                            //$this->stdout(' - already exist'. "\n");
                        }
                    }
                }
            }
        }
        if ($childPermissions = ArrayHelper::getValue($child, 'permissions')) {
            if ($childPermissions) {
                foreach ($childPermissions as $name) {
                    if ($permissionChild = \Yii::$app->authManager->getPermission($name)) {
                        try {
                            \Yii::$app->authManager->addChild($role, $permissionChild);
                            $this->stdout("\t\tassign child permission: " . $name . " - success" . "\n",
                                Console::FG_GREEN);
                        } catch (\Exception $e) {
                            //$this->stdout(' - already exist'. "\n");
                        }
                    }
                }
            }
        }
        return $role;
    }
1250251
public function has(string $name) : bool
    {
        try {
            $result = $this->configCommand($name);
        } catch (RuntimeException $exception) {
            return false;
        }

        return $result->isSuccessful();
    }
574402
function isValidConfig(config) {
    return (config.root != null && config.root.length > 0) &&
            isNullOrFunction(config.directoryFilter) &&
            isNullOrFunction(config.filesFilter) &&
            isNullOrString(config.directoryFilterRegex) &&
            isNullOrString(config.filesFilterRegex);
}
1160672
private boolean isExcludedLogger(String loggerName) {
        for (Pattern excludedLoggerPattern : EXCLUDED_LOGGER_PATTERNS) {
            if (excludedLoggerPattern.matcher(loggerName).matches()) {
                return true;
            }
        }
        return false;
    }
677643
private function configureLogger(\n2n\log4php\Logger $logger, $config) {
		$loggerName = $logger->getName();
		
		// Set logger level
		if (isset($config['level'])) {
			$level = \n2n\log4php\LoggerLevel::toLevel($config['level']);
			if (isset($level)) {
				$logger->setLevel($level);
			} else {
				$this->warn("Invalid level value [{$config['level']}] specified for logger [$loggerName]. Ignoring level definition.");
			}
		}
		
		// Link appenders to logger
		if (isset($config['appenders'])) {
			foreach($config['appenders'] as $appenderName) {
				if (isset($this->appenders[$appenderName])) {
					$logger->addAppender($this->appenders[$appenderName]);
				} else {
					$this->warn("Nonexistnant appender [$appenderName] linked to logger [$loggerName].");
				}
			}
		}
		
		// Set logger additivity
		if (isset($config['additivity'])) {
			try {
				$additivity = \n2n\log4php\option\OptionConverter::toBooleanEx($config['additivity'], null);
				$logger->setAdditivity($additivity);
			} catch (Exception $ex) {
				$this->warn("Invalid additivity value [{$config['additivity']}] specified for logger [$loggerName]. Ignoring additivity setting.");
			}
		}
	}
258272
public function isBenign($config, $context)
    {
        if (!$this->isLocal($config, $context)) {
            return false;
        }

        $scheme_obj = $this->getSchemeObj($config, $context);
        if (!$scheme_obj) {
            return false;
        } // conservative approach

        $current_scheme_obj = $config->getDefinition('URI')->getDefaultScheme($config, $context);
        if ($current_scheme_obj->secure) {
            if (!$scheme_obj->secure) {
                return false;
            }
        }
        return true;
    }
1325850
final protected function hasConfigs($config = null)
    {
        if (null !== $config) {
            return array_key_exists($config, self::$_configs);
        }

        return count(self::$_configs) > 0;
    }
552236
@SuppressWarnings("static-method")
	@Singleton
	@Provides
	public Logger provideRootLogger(ConfigurationFactory configFactory, Provider<Log4jIntegrationConfig> config) {
		final Logger root = Logger.getRootLogger();
		// Reroute JUL
		SLF4JBridgeHandler.removeHandlersForRootLogger();
		SLF4JBridgeHandler.install();
		final Log4jIntegrationConfig cfg = config.get();
		if (!cfg.getUseLog4jConfig()) {
			cfg.configureLogger(root);
		}
		return root;
	}