# 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
    00015     final class MailEncoding extends Enumeration
    00016     {
    00017         const SEVEN_BITS        = 0x01;
    00018         const EIGHT_BITS        = 0x02;
    00019         const BASE64            = 0x03;
    00020         const QUOTED            = 0x04;
    00021
    00022         protected $names = array(
    00023             self::SEVEN_BITS    => '7bit',
    00024             self::EIGHT_BITS    => '8bit',
    00025             self::BASE64        => 'base64',
    00026             self::QUOTED        => 'quoted-printable'
    00027         );
    00028
    00032         public static function seven()
    00033         {
    00034             return new self(self::SEVEN_BITS);
    00035         }
    00036
    00040         public static function eight()
    00041         {
    00042             return new self(self::EIGHT_BITS);
    00043         }
    00044
    00048         public static function base64()
    00049         {
    00050             return new self(self::BASE64);
    00051         }
    00052
    00056         public static function quoted()
    00057         {
    00058             return new self(self::QUOTED);
    00059         }
    00060     }
    00061 ?>