public function msgAdd(Msg $msg) { #print __CLASS__.'->'.__FUNCTION__.''."\n"; #print __CLASS__.'->'.__FUNCTION__.': '.$msg->getId()."\n"; $filePath = $msg->getFilePath(); if ($this->getDatadirBasePath() && !$filePath) { $filePath = $this->getDatadirBasePath() . '/msg_' . $msg->getId() . '.yml'; } $msg->setFilePath($filePath); $msg->setDatadirBasePath($this->getDatadirBasePath()); $msg->setMsgDb($this); $this->msgs[$msg->getId()] = $msg; $this->setDataChanged(true); }