Hook.php 341 B

1234567891011121314151617181920
  1. <?php
  2. declare(strict_types=1);
  3. class Minz_Hook {
  4. public const DEFAULT_PRIORITY = 0;
  5. public function __construct(
  6. private readonly \Closure $function,
  7. private readonly int $priority,
  8. ) {
  9. }
  10. public function getFunction(): \Closure {
  11. return $this->function;
  12. }
  13. public function getPriority(): int {
  14. return $this->priority;
  15. }
  16. }