-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReg.php
More file actions
82 lines (50 loc) · 1.58 KB
/
Reg.php
File metadata and controls
82 lines (50 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
namespace Twist;
/**
*
* @author Doug Carroll
* @email dougbcarroll@gmail.com
*
*/
class Reg extends Utilities
{
/**
* Log object used for writing messages
* @var Log
*/
public $log;
function __construct($file)
{
parent::__construct();
$this->log = new Logger();
register_activation_hook($file, array(&$this, "activate"));
register_deactivation_hook($file, array(&$this, "deactivate"));
}
public function activate()
{
$this->log->log("Plugin activated");
try {
$this->log->log("Creating saved quotes table");
$this->createSavedQuotesTable();
$this->log->log("Created saved quotes table successfully");
} catch (Exception $e) {
$this->log->log("Error could not create saved quotes table!");
}
try {
$this->log->log("Creating projects table");
$this->createProjectsTable();
$this->log->log("Created projects table successfully");
} catch (Exception $e) {
$this->log->log("Error could not create projects table!");
}
}
public function deactivate()
{
$this->log->log("Plugin deactived");
}
function __destruct()
{
// TODO - Insert your code here
}
}
?>