a tiny mvc framework for php using php-activerecord
at v1 44 lines 958 B view raw
1<?php 2class VenueCB extends ActiveRecord\Model 3{ 4 static $table_name = 'venues'; 5 static $before_save; 6 static $before_update; 7 static $before_create; 8 static $before_validation; 9 static $before_destroy = 'before_destroy_using_string'; 10 static $after_destroy = array('after_destroy_one', 'after_destroy_two'); 11 static $after_create; 12 13 // DO NOT add a static $after_construct for this. we are testing 14 // auto registration of callback with this 15 public function after_construct() {} 16 17 public function non_generic_after_construct() {} 18 19 public function after_destroy_one() {} 20 public function after_destroy_two() {} 21 22 public function before_destroy_using_string() {} 23 24 public function before_update_halt_execution() 25 { 26 return false; 27 } 28 29 public function before_destroy_halt_execution() 30 { 31 return false; 32 } 33 34 public function before_create_halt_execution() 35 { 36 return false; 37 } 38 39 public function before_validation_halt_execution() 40 { 41 return false; 42 } 43} 44?>