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