| 1 | <?php namespace EmailLog\Addon; |
||
| 10 | abstract class EmailLogAddon { |
||
| 11 | |||
| 12 | protected $addon_file; |
||
| 13 | protected $addon_name = ''; |
||
| 14 | protected $addon_version = ''; |
||
| 15 | protected $addon_author = 'Sudar Muthu'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Addon License Handler. |
||
| 19 | * |
||
| 20 | * @var EmailLog\Addon\AddonLicenseHandler. |
||
| 21 | */ |
||
| 22 | private $license_handler; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Initialize add-on data. |
||
| 26 | * |
||
| 27 | * @access protected |
||
| 28 | */ |
||
| 29 | abstract protected function initialize(); |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Construct a new EmailLogAddon instance. |
||
| 33 | * |
||
| 34 | * @param string $addon_file Addon main file. |
||
| 35 | * @param EmailLog\Addon\AddonLicenseHandler $license_handler Addon License Handler. |
||
| 36 | */ |
||
| 37 | public function __construct( $addon_file, $license_handler ) { |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Load the add-on and setup hooks. |
||
| 46 | * This method is called on `wp-loaded` hook. |
||
| 47 | */ |
||
| 48 | public function load() { |
||
| 52 | } |
||
| 53 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.