Vous êtes connecté en tant que anonymous Se Deconnecter
Browse code

Application modulaire fonctionnelle !

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

initial commit

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