c2ephp
|
00001 <?php 00006 00007 00008 define('COB_BLOCK_AGENT','agnt'); 00010 define('COB_BLOCK_FILE','file'); 00012 define('COB_BLOCK_AUTHOR','auth'); 00014 00016 abstract class COBBlock { 00018 00019 private $type; 00020 00022 00025 public function COBBlock($type) { 00026 if(strlen($type) != 4) { 00027 throw new Exception('Invalid COB block type: '.$type); 00028 } 00029 $this->type = $type; 00030 } 00032 00034 00037 public function GetType() { 00038 return $this->type; 00039 } 00041 00044 public abstract function Compile(); 00045 } 00046 ?>