Hook.php 417 B

123456789101112131415161718192021
  1. <?php
  2. declare(strict_types=1);
  3. namespace SixShop\Core\Attribute;
  4. use Attribute;
  5. #[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
  6. class Hook
  7. {
  8. /**
  9. * @param string|array $hook hook name
  10. * @param bool $isConsole is console
  11. */
  12. public function __construct(
  13. public string|array $hook,
  14. public bool $isConsole = false,
  15. )
  16. {
  17. }
  18. }