1 | <?php namespace EmailLog\Core; |
||
8 | class EmailLog { |
||
9 | |||
10 | /** |
||
11 | * Plugin Version number. |
||
12 | * |
||
13 | * @since Genesis |
||
14 | * @var string |
||
15 | */ |
||
16 | const VERSION = '2.0.0'; |
||
17 | |||
18 | /** |
||
19 | * Flag to track if the plugin is loaded. |
||
20 | * |
||
21 | * @since 2.0 |
||
22 | * @access private |
||
23 | * @var bool |
||
24 | */ |
||
25 | private $loaded = false; |
||
26 | |||
27 | /** |
||
28 | * Plugin file path. |
||
29 | * |
||
30 | * @since 2.0 |
||
31 | * @access private |
||
32 | * @var string |
||
33 | */ |
||
34 | private $plugin_file; |
||
35 | |||
36 | /** |
||
37 | * Filesystem directory path where translations are stored. |
||
38 | * |
||
39 | * @since 2.0 |
||
40 | * @var string |
||
41 | */ |
||
42 | public $translations_path; |
||
43 | |||
44 | /** |
||
45 | * Auto loader. |
||
46 | * |
||
47 | * @var \EmailLog\EmailLogAutoloader |
||
48 | */ |
||
49 | public $loader; |
||
50 | |||
51 | /** |
||
52 | * Database Table Manager. |
||
53 | * |
||
54 | * @since 2.0 |
||
55 | * @var \EmailLog\Core\DB\TableManager |
||
56 | */ |
||
57 | public $table_manager; |
||
58 | |||
59 | /** |
||
60 | * Email Logger. |
||
61 | * |
||
62 | * @since 2.0 |
||
63 | * @var \EmailLog\Core\EmailLogger |
||
64 | */ |
||
65 | public $logger; |
||
66 | |||
67 | /** |
||
68 | * UI Manager. |
||
69 | * |
||
70 | * @since 2.0 |
||
71 | * @var \EmailLog\Core\UI\UIManager |
||
72 | */ |
||
73 | public $ui_manager; |
||
74 | 2 | ||
75 | 2 | /** |
|
76 | 2 | * Dependency Enforce. |
|
77 | 2 | * |
|
78 | * @var \EmailLog\Addon\DependencyEnforcer |
||
79 | */ |
||
80 | public $dependency_enforcer; |
||
81 | |||
82 | 2 | /** |
|
83 | 2 | * List of subscribers. |
|
84 | * |
||
85 | * @var array |
||
86 | */ |
||
87 | 2 | private $subscribers = array(); |
|
88 | |||
89 | 2 | /** |
|
90 | 2 | * Initialize the plugin. |
|
91 | 2 | * |
|
92 | * @param string $file Plugin file. |
||
93 | 2 | */ |
|
94 | 2 | public function __construct( $file ) { |
|
98 | |||
99 | /** |
||
100 | * Add an Email Log Subscriber. |
||
101 | * The `load()` method of the subscribers will be called when Email Log is loaded. |
||
102 | * |
||
103 | * @param \EmailLog\Core\EmailLogSubscriber $subscriber Subscriber to be loaded. |
||
104 | * |
||
105 | * @return bool False if Email Log is already loaded or if subscriber is not of `EmailLogSubscriber` type. True otherwise. |
||
106 | */ |
||
107 | public function add_subscriber( $subscriber ) { |
||
120 | |||
121 | /** |
||
122 | * Load the plugin. |
||
123 | */ |
||
124 | public function load() { |
||
149 | |||
150 | /** |
||
151 | * Return Email Log version. |
||
152 | * |
||
153 | * @return string Email Log Version. |
||
154 | */ |
||
155 | public function get_version() { |
||
158 | |||
159 | /** |
||
160 | * Return the Email Log plugin directory path. |
||
161 | * |
||
162 | * @return string Plugin directory path. |
||
163 | */ |
||
164 | public function get_plugin_path() { |
||
167 | |||
168 | /** |
||
169 | * Return the Email Log plugin file. |
||
170 | * |
||
171 | * @since 2.0.0 |
||
172 | * |
||
173 | * @return string Plugin directory path. |
||
174 | */ |
||
175 | public function get_plugin_file() { |
||
178 | } |
||
179 |