00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00016 final class RequestType extends Enumeration
00017 {
00018 const GET = 1;
00019 const POST = 2;
00020 const FILES = 3;
00021 const COOKIE = 4;
00022 const SESSION = 5;
00023 const ATTACHED = 6;
00024
00025 protected $names = array(
00026 self::GET => 'get',
00027 self::POST => 'post',
00028 self::FILES => 'files',
00029 self::COOKIE => 'cookie',
00030 self::SESSION => 'session',
00031 self::ATTACHED => 'attached'
00032 );
00033
00037 public static function get()
00038 {
00039 return new self(self::GET);
00040 }
00041
00045 public static function post()
00046 {
00047 return new self(self::POST);
00048 }
00049
00053 public static function files()
00054 {
00055 return new self(self::FILES);
00056 }
00057
00061 public static function cookie()
00062 {
00063 return new self(self::COOKIE);
00064 }
00065
00069 public static function session()
00070 {
00071 return new self(self::SESSION);
00072 }
00073
00077 public static function attached()
00078 {
00079 return new self(self::ATTACHED);
00080 }
00081 }
00082 ?>