You are here

function cmfcClassesCore::getMessageValue in Calendar Systems 5

File

calendar/lib/classesCore.class.inc.php, line 125

Class

cmfcClassesCore
all cmf classes inherit from this class

Code

function getMessageValue($msgCode, $parameters = null) {
  if (isset($this->_messagesValue[$msgCode])) {
    $message = $this->_messagesValue[$msgCode];
  }
  else {
    $message = $this->_messagesValue[$this->_defaultError];
  }
  if (is_array($parameters)) {
    $message = sprintf($message, $parameters);
  }
  return $message;
}