| 1 |
<?php |
| 2 |
namespace EmbedPress\Ends; |
| 3 |
|
| 4 |
(defined('ABSPATH') && defined('EMBEDPRESS_IS_LOADED')) or die("No direct script access allowed."); |
| 5 |
|
| 6 |
/** |
| 7 |
* Modeling class to handle the plugin in different environments. I.e: public area/admin area. |
| 8 |
* |
| 9 |
* @package EmbedPress |
| 10 |
* @subpackage EmbedPress/Ends |
| 11 |
* @author PressShack <help@pressshack.com> |
| 12 |
* @copyright Copyright (C) 2016 Open Source Training, LLC. All rights reserved. |
| 13 |
* @license GPLv2 or later |
| 14 |
* @since 1.0.0 |
| 15 |
*/ |
| 16 |
abstract class Handler |
| 17 |
{ |
| 18 |
/** |
| 19 |
* The name of the plugin. |
| 20 |
* |
| 21 |
* @since 1.0.0 |
| 22 |
* @access private |
| 23 |
* |
| 24 |
* @var string $pluginName The name of the plugin. |
| 25 |
*/ |
| 26 |
protected $pluginName; |
| 27 |
|
| 28 |
/** |
| 29 |
* The version of the plugin. |
| 30 |
* |
| 31 |
* @since 1.0.0 |
| 32 |
* @access private |
| 33 |
* |
| 34 |
* @var string $pluginVersion The version of the plugin. |
| 35 |
*/ |
| 36 |
protected $pluginVersion; |
| 37 |
|
| 38 |
/** |
| 39 |
* Initialize the class and set its properties. |
| 40 |
* |
| 41 |
* @since 1.0.0 |
| 42 |
* |
| 43 |
* @param string $pluginName - The name of the plugin. |
| 44 |
* @param string $pluginVersion - The version of the plugin. |
| 45 |
* @return void |
| 46 |
*/ |
| 47 |
public function __construct($pluginName, $pluginVersion) |
| 48 |
{ |
| 49 |
$this->pluginName = $pluginName; |
| 50 |
$this->pluginVersion = $pluginVersion; |
| 51 |
} |
| 52 |
|
| 53 |
/** |
| 54 |
* Method that register all scripts for the admin area. |
| 55 |
* |
| 56 |
* @since 1.0.0 |
| 57 |
* @abstract |
| 58 |
* |
| 59 |
* @return void |
| 60 |
*/ |
| 61 |
abstract public function enqueueScripts(); |
| 62 |
|
| 63 |
/** |
| 64 |
* Method that register all stylesheets for the admin area. |
| 65 |
* |
| 66 |
* @since 1.0.0 |
| 67 |
* @abstract |
| 68 |
* |
| 69 |
* @return void |
| 70 |
*/ |
| 71 |
abstract public function enqueueStyles(); |
| 72 |
} |
| 73 |
|