public function setProperties($properties, $prefix) { $len = strlen($prefix); reset($properties); while (list($key, ) = each($properties)) { if (strpos($key, $prefix) === 0) { if (strpos($key, '.', $len + 1) > 0) { continue; } $value = Ideasa_Log4php_Helpers_LoggerOptionConverter::findAndSubst($key, $properties); $key = substr($key, $len); if ($key == 'layout' and $this->obj instanceof Ideasa_Log4php_LoggerAppender) { continue; } $this->setProperty($key, $value); } } $this->activate(); }
/** * Parse the additivity option for a non-root category. * * @param array $props array of properties * @param Logger $cat * @param string $loggerName */ private function parseAdditivityForLogger($props, Ideasa_Log4php_Logger $cat, $loggerName) { $value = Ideasa_Log4php_Helpers_LoggerOptionConverter::findAndSubst(self::ADDITIVITY_PREFIX . $loggerName, $props); $additivity = Ideasa_Log4php_Helpers_LoggerOptionConverter::toBoolean($value, true); $cat->setAdditivity($additivity); }