private function getParameterClassConstant($constant, $exceptionMsg) { if (defined($constant)) { return constant($constant); } else { throw new \BadMethodCallException($exceptionMsg); } }