Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4. namespace Financer_Review;
  5.  
  6. use Financer_Review\Core\Plugin as PluginBase;
  7. use Financer_Review\Managers\Review;
  8.  
  9. /**
  10. * Class Plugin
  11. *
  12. * @package Financer_Review
  13. */
  14. class Plugin extends PluginBase {
  15.  
  16. /**
  17. * Plugin version
  18. */
  19. const VERSION = '0.1.0';
  20.  
  21. /**
  22. * Plugin slug name
  23. */
  24. const PLUGIN_SLUG = 'financer-review';
  25.  
  26. /**
  27. * Plugin namespace
  28. */
  29. const PLUGIN_NAMESPACE = '\Financer_Review';
  30.  
  31. /**
  32. * @var ReviewComponent
  33. */
  34. private $review_component;
  35.  
  36. /**
  37. * @var Review Module
  38. */
  39. private $review_manager;
  40.  
  41.  
  42. /**
  43. * Plugin constructor.
  44. *
  45. */
  46. public function __construct(ReviewComponent $review_component, Review $review_manager) {
  47. $this->review_component = $review_component;
  48. $this->review_manager = $review_manager;
  49. parent::__construct();
  50. }
  51.  
  52. /**
  53. * Method to check if plugin has its dependencies. If not, it silently aborts
  54. *
  55. * @return bool
  56. */
  57. protected function get_dependancies_exist() {
  58. return true;
  59. }
  60.  
  61. /**
  62. * @return bool
  63. * @throws \Exception
  64. */
  65. protected function load_components() {
  66. // Conditionally lazy load components with $this->load()
  67. return true;
  68. }
  69.  
  70. /**
  71. * @return bool
  72. */
  73. public function setup() {
  74. return true;
  75. }
  76.  
  77. /**
  78. * Plugin activation and upgrade
  79. *
  80. * @param $network_wide
  81. *
  82. * @return void
  83. */
  84. public function activate( $network_wide ) {
  85.  
  86. }
  87.  
  88. /**
  89. * Plugin de-activation
  90. *
  91. * @param $network_wide
  92. *
  93. * @return void
  94. */
  95. public function deactivate( $network_wide ) {
  96.  
  97. }
  98.  
  99. /**
  100. * Plugin uninstall
  101. *
  102. * @return void
  103. */
  104. public function uninstall() {
  105.  
  106. }
  107.  
  108.  
  109. /**
  110. * @return ReviewComponent
  111. */
  112. public function get_review_component() {
  113. return $this->review_component;
  114. }
  115.  
  116.  
  117. /**
  118. * @return \Financer_Review\Managers\Review
  119. */
  120. public function get_review_manager() {
  121. return $this->review_manager;
  122. }
  123.  
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement