/** * @param $optionName * @param $optionValue * * @return bool True if the option is OK for storage, otherwise a string error message. */ private function _validateOneForStorage($optionName, $optionValue) { $optionValidatorService = tubepress_impl_patterns_sl_ServiceLocator::getOptionValidator(); $shouldLog = $this->_logger->isHandling(ehough_epilog_Logger::DEBUG); /** OK, let's see if it's valid. */ if ($optionValidatorService->isValid($optionName, $optionValue)) { if ($shouldLog) { $this->_logger->info(sprintf("Accepted valid value: '%s' = '%s'", $optionName, $optionValue)); } return true; } $problemMessage = $optionValidatorService->getProblemMessage($optionName, $optionValue); if ($shouldLog) { $this->_logger->info(sprintf("Ignoring invalid value: '%s' = '%s'", $optionName, $optionValue)); } return $problemMessage; }