| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Class test_extension_manager_paymenttest |
| 5 | */ |
| 6 | class test_extension_manager_paymenttest extends CRM_Core_Payment { |
| 7 | |
| 8 | static $counts = array(); |
| 9 | |
| 10 | public function install() { |
| 11 | self::$counts['install'] = isset(self::$counts['install']) ? self::$counts['install'] : 0; |
| 12 | self::$counts['install'] = 1 + (int) self::$counts['install']; |
| 13 | } |
| 14 | |
| 15 | public function uninstall() { |
| 16 | self::$counts['uninstall'] = isset(self::$counts['uninstall']) ? self::$counts['uninstall'] : 0; |
| 17 | self::$counts['uninstall'] = 1 + (int) self::$counts['uninstall']; |
| 18 | } |
| 19 | |
| 20 | public function disable() { |
| 21 | self::$counts['disable'] = isset(self::$counts['disable']) ? self::$counts['disable'] : 0; |
| 22 | self::$counts['disable'] = 1 + (int) self::$counts['disable']; |
| 23 | } |
| 24 | |
| 25 | public function enable() { |
| 26 | self::$counts['enable'] = isset(self::$counts['enable']) ? self::$counts['enable'] : 0; |
| 27 | self::$counts['enable'] = 1 + (int) self::$counts['enable']; |
| 28 | } |
| 29 | |
| 30 | public function checkConfig() { |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Get the desired value from $counts. |
| 35 | * |
| 36 | * @param string $type |
| 37 | * |
| 38 | * @return int |
| 39 | */ |
| 40 | public static function getCount($type) { |
| 41 | return isset(self::$counts[$type]) ? self::$counts[$type] : 0; |
| 42 | } |
| 43 | |
| 44 | } |