private function createAppenderLayout(LoggerAppender $appender, $config) {
		$name = $appender->getName();
		$class = $config['class'];
		if (empty($class)) {
			$this->warn("Layout class not specified for appender [$name]. Reverting to default layout.");
			return;
		}
		if (!class_exists($class)) {
			$this->warn("Nonexistant layout class [$class] specified for appender [$name]. Reverting to default layout.");
			return;
		}
		
		$layout = new $class();
		if (!($layout instanceof LoggerLayout)) {
			$this->warn("Invalid layout class [$class] sepcified for appender [$name]. Reverting to default layout.");
			return;
		}
		
		if (isset($config['params'])) {
			$this->setOptions($layout, $config['params']);
		}
		
		$layout->activateOptions();
		$appender->setLayout($layout);
	}
private function createAppenderLayout(LoggerAppender $appender, $config) {
		$name = $appender->getName();
		$class = $config['class'];
		if (empty($class)) {
			$this->warn("Layout class not specified for appender [$name]. Reverting to default layout.");
			return;
		}
		if (!class_exists($class)) {
			$this->warn("Nonexistant layout class [$class] specified for appender [$name]. Reverting to default layout.");
			return;
		}
		
		$layout = new $class();
		if (!($layout instanceof LoggerLayout)) {
			$this->warn("Invalid layout class [$class] sepcified for appender [$name]. Reverting to default layout.");
			return;
		}
		
		if (isset($config['params'])) {
			$this->setOptions($layout, $config['params']);
		}
		
		$layout->activateOptions();
		$appender->setLayout($layout);
	}
private function createAppenderLayout ( LoggerAppender $ appender , $ config ) { $ name = $ appender -> getName ( ) ; $ class = $ config [ 'class' ] ; if ( empty ( $ class ) ) { $ this -> warn ( "Layout class not specified for appender [$name]. Reverting to default layout." ) ; return ; } if ( ! class_exists ( $ class ) ) { $ this -> warn ( "Nonexistant layout class [$class] specified for appender [$name]. Reverting to default layout." ) ; return ; } $ layout = new $ class ( ) ; if ( ! ( $ layout instanceof LoggerLayout ) ) { $ this -> warn ( "Invalid layout class [$class] sepcified for appender [$name]. Reverting to default layout." ) ; return ; } if ( isset ( $ config [ 'params' ] ) ) { $ this -> setOptions ( $ layout , $ config [ 'params' ] ) ; } $ layout -> activateOptions ( ) ; $ appender -> setLayout ( $ layout ) ; }
Parses layout config, creates the layout and links it to the appender.
@param LoggerAppender $appender
@param array $config Layout configuration.
Parses layout config creates the layout and links it to the appender .