File: 0.00.1a/core/FreeDESK_PIM.php (View as Code)

1: 2: /* ------------------------------------------------------------- 3: This file is part of FreeDESK 4: 5: FreeDESK is (C) Copyright 2012 David Cutting 6: 7: FreeDESK is free software: you can redistribute it and/or modify 8: it under the terms of the GNU General Public License as published by 9: the Free Software Foundation, either version 3 of the License, or 10: (at your option) any later version. 11: 12: FreeDESK is distributed in the hope that it will be useful, 13: but WITHOUT ANY WARRANTY; without even the implied warranty of 14: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15: GNU General Public License for more details. 16: 17: You should have received a copy of the GNU General Public License 18: along with FreeDESK. If not, see www.gnu.org/licenses 19: 20: For more information see www.purplepixie.org/freedesk/ 21: -------------------------------------------------------------- */ 22: 23: /** 24: * FreeDESK_PIM is the abstacr base class for all PIM components 25: **/ 26: abstract class FreeDESK_PIM 27: { 28: /** 29: * FreeDESK instance 30: **/ 31: protected $DESK = null; 32: 33: /** 34: * File path for PIM 35: **/ 36: protected $filepath = ""; 37: 38: /** 39: * Web path for PIM 40: **/ 41: protected $webpath = ""; 42: 43: /** 44: * ID for PIM 45: **/ 46: protected $ID = 0; 47: 48: /** 49: * Main Constructor 50: * @param mixed $freeDESK FreeDESK instance 51: * @param string $filepath Path to plugin directory (filebase) 52: * @param string $webpath Path to plugin directory (webpath) 53: * @param int $id Internal FreeDESK ID for PIM 54: **/ 55: function FreeDESK_PIM(&$freeDESK, $filepath, $webpath, $id) 56: { 57: $this->DESK = &$freeDESK; 58: $this->filepath = $filepath; 59: $this->webpath = $webpath; 60: $this->ID = $id; 61: } 62: 63: /** 64: * Start (when an instance is started from within the system and is installed - to be overriden 65: **/ 66: function Start() 67: { 68: // 69: } 70: 71: /** 72: * Install - to be overriden 73: **/ 74: function Install() 75: { 76: // 77: } 78: 79: /** 80: * Activate - to be overriden 81: **/ 82: function Activate() 83: { 84: // 85: } 86: 87: /** 88: * De-Activate - to be overriden 89: **/ 90: function Deactivate() 91: { 92: // 93: } 94: 95: /** 96: * Uninstall - to be overriden 97: **/ 98: function Uninstall() 99: { 100: // 101: } 102: 103: /** 104: * API Call - to be overriden 105: * @param string $mode API Mode 106: **/ 107: function API($mode) 108: { 109: // 110: } 111: 112: /** 113: * Event Call - to be overriden 114: * @param string $event Event 115: * @param mixed &$data Event data (dependent on the event) 116: **/ 117: function Event($event, &$data) 118: { 119: // 120: } 121: 122: /** 123: * Build any menu items needed - to be overriden 124: **/ 125: function BuildMenu() 126: { 127: // 128: } 129: 130: /** 131: * Page has been called for this plugin - to be overriden 132: * @param string $page Page identifier 133: **/ 134: function Page($page) 135: { 136: // 137: } 138: 139: /** 140: * Static exec/registration function to list provided interfaces 141: * @param mixed $DESK Reference to current FreeDESK instance 142: **/ 143: static function Exec(&$DESK) 144: { 145: // 146: } 147: 148: } 149: ?> 150: