Lang.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. /**
  4. * @method static bool hasForLocale(string $key, string|null $locale = null)
  5. * @method static bool has(string $key, string|null $locale = null, bool $fallback = true)
  6. * @method static string|array get(string $key, array $replace = [], string|null $locale = null, bool $fallback = true)
  7. * @method static string choice(string $key, \Countable|int|float|array $number, array $replace = [], string|null $locale = null)
  8. * @method static void addLines(array $lines, string $locale, string $namespace = '*')
  9. * @method static void load(string $namespace, string $group, string $locale)
  10. * @method static \Illuminate\Translation\Translator handleMissingKeysUsing(callable|null $callback)
  11. * @method static void addNamespace(string $namespace, string $hint)
  12. * @method static void addPath(string $path)
  13. * @method static void addJsonPath(string $path)
  14. * @method static array parseKey(string $key)
  15. * @method static void determineLocalesUsing(callable $callback)
  16. * @method static \Illuminate\Translation\MessageSelector getSelector()
  17. * @method static void setSelector(\Illuminate\Translation\MessageSelector $selector)
  18. * @method static \Illuminate\Contracts\Translation\Loader getLoader()
  19. * @method static string locale()
  20. * @method static string getLocale()
  21. * @method static void setLocale(string $locale)
  22. * @method static string getFallback()
  23. * @method static void setFallback(string $fallback)
  24. * @method static void setLoaded(array $loaded)
  25. * @method static void stringable(callable|string $class, callable|null $handler = null)
  26. * @method static void setParsedKey(string $key, array $parsed)
  27. * @method static void flushParsedKeys()
  28. * @method static void macro(string $name, object|callable $macro)
  29. * @method static void mixin(object $mixin, bool $replace = true)
  30. * @method static bool hasMacro(string $name)
  31. * @method static void flushMacros()
  32. *
  33. * @see \Illuminate\Translation\Translator
  34. */
  35. class Lang extends Facade
  36. {
  37. /**
  38. * Get the registered name of the component.
  39. *
  40. * @return string
  41. */
  42. protected static function getFacadeAccessor()
  43. {
  44. return 'translator';
  45. }
  46. }