Blame view

public/vendor/illuminate/support/Facades/Date.php 5.46 KB
86143e36f   Андрей Ларионов   Коммит вторник
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
  <?php
  
  namespace Illuminate\Support\Facades;
  
  use Illuminate\Support\DateFactory;
  
  /**
   * @see https://carbon.nesbot.com/docs/
   * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php
   *
   * @method static \Illuminate\Support\Carbon create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromDate($year = null, $month = null, $day = null, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromTimeString($time, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromTimestamp($timestamp, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromTimestampMs($timestamp, $tz = null)
   * @method static \Illuminate\Support\Carbon createFromTimestampUTC($timestamp)
   * @method static \Illuminate\Support\Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null)
   * @method static \Illuminate\Support\Carbon disableHumanDiffOption($humanDiffOption)
   * @method static \Illuminate\Support\Carbon enableHumanDiffOption($humanDiffOption)
   * @method static \Illuminate\Support\Carbon fromSerialized($value)
   * @method static \Illuminate\Support\Carbon getLastErrors()
   * @method static \Illuminate\Support\Carbon getTestNow()
   * @method static \Illuminate\Support\Carbon instance($date)
   * @method static \Illuminate\Support\Carbon isMutable()
   * @method static \Illuminate\Support\Carbon maxValue()
   * @method static \Illuminate\Support\Carbon minValue()
   * @method static \Illuminate\Support\Carbon now($tz = null)
   * @method static \Illuminate\Support\Carbon parse($time = null, $tz = null)
   * @method static \Illuminate\Support\Carbon setHumanDiffOptions($humanDiffOptions)
   * @method static \Illuminate\Support\Carbon setTestNow($testNow = null)
   * @method static \Illuminate\Support\Carbon setUtf8($utf8)
   * @method static \Illuminate\Support\Carbon today($tz = null)
   * @method static \Illuminate\Support\Carbon tomorrow($tz = null)
   * @method static \Illuminate\Support\Carbon useStrictMode($strictModeEnabled = true)
   * @method static \Illuminate\Support\Carbon yesterday($tz = null)
   * @method static \Illuminate\Support\Carbon|false createFromFormat($format, $time, $tz = null)
   * @method static \Illuminate\Support\Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null)
   * @method static \Illuminate\Support\Carbon|null make($var)
   * @method static \Symfony\Component\Translation\TranslatorInterface getTranslator()
   * @method static array getAvailableLocales()
   * @method static array getDays()
   * @method static array getIsoUnits()
   * @method static array getWeekendDays()
   * @method static bool hasFormat($date, $format)
   * @method static bool hasMacro($name)
   * @method static bool hasRelativeKeywords($time)
   * @method static bool hasTestNow()
   * @method static bool isImmutable()
   * @method static bool isModifiableUnit($unit)
   * @method static bool isStrictModeEnabled()
   * @method static bool localeHasDiffOneDayWords($locale)
   * @method static bool localeHasDiffSyntax($locale)
   * @method static bool localeHasDiffTwoDayWords($locale)
   * @method static bool localeHasPeriodSyntax($locale)
   * @method static bool localeHasShortUnits($locale)
   * @method static bool setLocale($locale)
   * @method static bool shouldOverflowMonths()
   * @method static bool shouldOverflowYears()
   * @method static int getHumanDiffOptions()
   * @method static int getMidDayAt()
   * @method static int getWeekEndsAt()
   * @method static int getWeekStartsAt()
   * @method static mixed executeWithLocale($locale, $func)
   * @method static mixed use(mixed $handler)
   * @method static string getLocale()
   * @method static string pluralUnit(string $unit)
   * @method static string singularUnit(string $unit)
   * @method static void macro($name, $macro)
   * @method static void mixin($mixin)
   * @method static void resetMonthsOverflow()
   * @method static void resetToStringFormat()
   * @method static void resetYearsOverflow()
   * @method static void serializeUsing($callback)
   * @method static void setMidDayAt($hour)
   * @method static void setToStringFormat($format)
   * @method static void setTranslator(\Symfony\Component\Translation\TranslatorInterface $translator)
   * @method static void setWeekEndsAt($day)
   * @method static void setWeekStartsAt($day)
   * @method static void setWeekendDays($days)
   * @method static void useCallable(callable $callable)
   * @method static void useClass(string $class)
   * @method static void useDefault()
   * @method static void useFactory(object $factory)
   * @method static void useMonthsOverflow($monthsOverflow = true)
   * @method static void useYearsOverflow($yearsOverflow = true)
   */
  class Date extends Facade
  {
      const DEFAULT_FACADE = DateFactory::class;
  
      /**
       * Get the registered name of the component.
       *
       * @return string
       *
       * @throws \RuntimeException
       */
      protected static function getFacadeAccessor()
      {
          return 'date';
      }
  
      /**
       * Resolve the facade root instance from the container.
       *
       * @param  string  $name
       * @return mixed
       */
      protected static function resolveFacadeInstance($name)
      {
          if (! isset(static::$resolvedInstance[$name]) && ! isset(static::$app, static::$app[$name])) {
              $class = static::DEFAULT_FACADE;
  
              static::swap(new $class);
          }
  
          return parent::resolveFacadeInstance($name);
      }
  }