14-service.php 686 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace cx_newsletter;
  3. abstract class service
  4. implements service_interface {
  5. public function __construct(
  6. \wpdb $database,
  7. table_names $tables,
  8. settings $settings
  9. ) {
  10. $this->database = $database;
  11. $this->tables = $tables;
  12. $this->settings = $settings;
  13. }
  14. protected function get_database() : \wpdb {
  15. return $this->database;
  16. }
  17. protected function get_tables() : table_names {
  18. return $this->tables;
  19. }
  20. protected function get_settings() : settings {
  21. return $this->settings;
  22. }
  23. private \wpdb $database;
  24. private table_names $tables;
  25. private settings $settings;
  26. }