コード例 #1
0
ファイル: FileSink.php プロジェクト: nagyist/tao-core
 public function send(Message $message)
 {
     $messageFile = $this->getFilePath($message->getTo());
     \common_Logger::d('Wrote message to ' . $messageFile);
     $written = file_put_contents($messageFile, $message->getBody());
     return $written !== false;
 }
コード例 #2
0
 public function send(Message $message)
 {
     $receiver = $message->getTo();
     $path = $this->getOption(self::CONFIG_FILEPATH) . \tao_helpers_File::getSafeFileName($receiver->getIdentifier()) . DIRECTORY_SEPARATOR;
     if (!file_exists($path)) {
         mkdir($path);
     }
     $messageFile = $path . \tao_helpers_File::getSafeFileName('message.html', $path);
     \common_Logger::d($messageFile);
     $written = file_put_contents($messageFile, $message->getBody());
     return $written !== false;
 }