Example #1
0
 static function decode_file($filename)
 {
     $f = self::Base64DecoderStream($filename);
     Core_Strings::begin_binary();
     while ($line = self::get()) {
         $line = trim($line);
         if ($line == '!ENDFILE') {
             break;
         }
         $f->write($line);
     }
     $f->close();
     Core_Strings::end_binary();
     chmod($filename, CMS::$chmod_file);
 }
Example #2
0
 /**
  * Декодирует сообщение
  *
  * @return Mail_Message_Message
  */
 public function decode()
 {
     Core_Strings::begin_binary();
     $result = ($head = $this->decode_head()) ? $this->decode_part(Mail::Message()->head($head)) : null;
     Core_Strings::end_binary();
     return $result;
 }