Context.php 649 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Dcat\Admin\Support;
  3. use Illuminate\Support\Arr;
  4. use Illuminate\Support\Fluent;
  5. /**
  6. * Class Context.
  7. *
  8. * @property string $favicon
  9. * @property string $metaTitle
  10. * @property string $pjaxContainerId
  11. * @property array|null $html
  12. * @property array|null $ignoreQueries
  13. * @property array|null $jsVariables
  14. */
  15. class Context extends Fluent
  16. {
  17. public function get($key, $default = null)
  18. {
  19. return Arr::get($this->attributes, $key, $default);
  20. }
  21. public function forget($keys)
  22. {
  23. Arr::forget($this->attributes, $keys);
  24. }
  25. public function flush()
  26. {
  27. $this->attributes = [];
  28. }
  29. }