00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00016 final class ForeignChangeAction extends Enumeration
00017 {
00018 const NO_ACTION = 0x01;
00019 const RESTRICT = 0x02;
00020 const CASCADE = 0x03;
00021 const SET_NULL = 0x04;
00022 const SET_DEFAULT = 0x05;
00023
00024 protected $names = array(
00025 self::NO_ACTION => 'NO ACTION',
00026 self::RESTRICT => 'RESTRICT',
00027 self::CASCADE => 'CASCADE',
00028 self::SET_NULL => 'SET NULL',
00029 self::SET_DEFAULT => 'SET DEFAULT'
00030 );
00031
00035 public static function noAction()
00036 {
00037 return new self(self::NO_ACTION);
00038 }
00039
00043 public static function restrict()
00044 {
00045 return new self(self::RESTRICT);
00046 }
00047
00051 public static function cascade()
00052 {
00053 return new self(self::CASCADE);
00054 }
00055
00059 public static function setNull()
00060 {
00061 return new self(self::SET_NULL);
00062 }
00063
00067 public static function setDefault()
00068 {
00069 return new self(self::SET_DEFAULT);
00070 }
00071 }
00072 ?>