| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | abstract class AbstractHooks |
||
| 8 | { |
||
| 9 | protected $basename; |
||
| 10 | protected $id; |
||
| 11 | protected $prefix; |
||
| 12 | protected $taxonomy; |
||
| 13 | protected $type; |
||
| 14 | |||
| 15 | public function __construct() |
||
| 16 | { |
||
| 17 | $this->basename = plugin_basename(glsr()->file); |
||
| 18 | $this->id = glsr()->id; |
||
| 19 | $this->prefix = glsr()->prefix; |
||
| 20 | $this->taxonomy = glsr()->taxonomy; |
||
| 21 | $this->type = glsr()->post_type; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param string $classname |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | public function hook($classname, array $hooks) |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @return void |
||
| 44 | */ |
||
| 45 | abstract public function run(); |
||
| 46 | } |
||
| 47 |