| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace cx_newsletter;
- abstract class activity
- extends \cx_appengine\validable_activity {
- use activity_toast;
- use activity_fail;
- use activity_simple_template;
- public function __construct(
- \wpdb $database,
- settings $settings,
- \cx_appengine\templates $templates,
- table_names $tables
- ) {
- $this->database = $database;
- $this->settings = $settings;
- $this->tables = $tables;
- $this->error = null;
- $this->toast = null;
- $this
- ->construct_fail()
- ->construct_toast()
- ->construct_simple_template();
- parent::__construct($templates);
- }
- public static function get_name() : string {
- return get_called_class();
- }
- protected function get_tables() : table_names {
- return $this->tables;
- }
- protected function get_settings() : settings {
- return $this->settings;
- }
-
- protected function get_database() : \wpdb {
- return $this->database;
- }
- private table_names $tables;
- private \wpdb $database;
- private settings $settings;
- }
|