MailEncoding.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2006-2007 by Konstantin V. Arkhipov                     *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 /* $Id: MailEncoding.class.php 4687 2007-12-09 18:57:18Z voxus $ */
00012 
00016     final class MailEncoding extends Enumeration
00017     {
00018         const SEVEN_BITS        = 0x01;
00019         const EIGHT_BITS        = 0x02;
00020         const BASE64            = 0x03;
00021         const QUOTED            = 0x04;
00022         
00023         protected $names = array(
00024             self::SEVEN_BITS    => '7bit',
00025             self::EIGHT_BITS    => '8bit',
00026             self::BASE64        => 'base64',
00027             self::QUOTED        => 'quoted-printable'
00028         );
00029         
00033         public static function seven()
00034         {
00035             return new self(self::SEVEN_BITS);
00036         }
00037         
00041         public static function eight()
00042         {
00043             return new self(self::EIGHT_BITS);
00044         }
00045         
00049         public static function base64()
00050         {
00051             return new self(self::BASE64);
00052         }
00053         
00057         public static function quoted()
00058         {
00059             return new self(self::QUOTED);
00060         }
00061     }
00062 ?>

Generated on Sun Dec 9 21:56:24 2007 for onPHP by  doxygen 1.5.4