/
home
/
techb158
/
ileadtechnology.com
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Support
/
/home/techb158/ileadtechnology.com/vendor/laravel/framework/src/Illuminate/Support
mkdir
upload
Name
Size
Mode
Actions
Facades/
-
0755
rm
Testing/
-
0755
rm
Traits/
-
0755
rm
AggregateServiceProvider.php
995
0644
edit
dl
rm
Arr.php
16075
0755
edit
dl
rm
Carbon.php
115
0644
edit
dl
rm
Collection.php
32590
0644
edit
dl
rm
composer.json
1545
0644
edit
dl
rm
Composer.php
2390
0644
edit
dl
rm
ConfigurationUrlParser.php
4389
0644
edit
dl
rm
DateFactory.php
8022
0644
edit
dl
rm
Enumerable.php
22074
0644
edit
dl
rm
Env.php
2693
0644
edit
dl
rm
Fluent.php
3879
0755
edit
dl
rm
helpers.php
13534
0755
edit
dl
rm
HigherOrderCollectionProxy.php
1408
0644
edit
dl
rm
HigherOrderTapProxy.php
665
0644
edit
dl
rm
HigherOrderWhenProxy.php
1307
0644
edit
dl
rm
HtmlString.php
877
0644
edit
dl
rm
InteractsWithTime.php
1588
0644
edit
dl
rm
LazyCollection.php
33322
0644
edit
dl
rm
LICENSE.md
1075
0644
edit
dl
rm
Manager.php
4076
0755
edit
dl
rm
MessageBag.php
9750
0755
edit
dl
rm
NamespacedItemResolver.php
3269
0755
edit
dl
rm
Optional.php
2641
0644
edit
dl
rm
Pluralizer.php
3207
0755
edit
dl
rm
ProcessUtils.php
2050
0644
edit
dl
rm
Reflector.php
2672
0644
edit
dl
rm
ServiceProvider.php
9518
0755
edit
dl
rm
Str.php
19414
0644
edit
dl
rm
Stringable.php
16336
0644
edit
dl
rm
ViewErrorBag.php
2622
0644
edit
dl
rm
Edit:
/home/techb158/ileadtechnology.com/vendor/laravel/framework/src/Illuminate/Support/DateFactory.php
(8022B)
<?php namespace Illuminate\Support; use Carbon\Factory; use InvalidArgumentException; /** * @see https://carbon.nesbot.com/docs/ * @see https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Factory.php * * @method static Carbon create($year = 0, $month = 1, $day = 1, $hour = 0, $minute = 0, $second = 0, $tz = null) * @method static Carbon createFromDate($year = null, $month = null, $day = null, $tz = null) * @method static Carbon|false createFromFormat($format, $time, $tz = null) * @method static Carbon createFromTime($hour = 0, $minute = 0, $second = 0, $tz = null) * @method static Carbon createFromTimeString($time, $tz = null) * @method static Carbon createFromTimestamp($timestamp, $tz = null) * @method static Carbon createFromTimestampMs($timestamp, $tz = null) * @method static Carbon createFromTimestampUTC($timestamp) * @method static Carbon createMidnightDate($year = null, $month = null, $day = null, $tz = null) * @method static Carbon|false createSafe($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) * @method static Carbon disableHumanDiffOption($humanDiffOption) * @method static Carbon enableHumanDiffOption($humanDiffOption) * @method static mixed executeWithLocale($locale, $func) * @method static Carbon fromSerialized($value) * @method static array getAvailableLocales() * @method static array getDays() * @method static int getHumanDiffOptions() * @method static array getIsoUnits() * @method static Carbon getLastErrors() * @method static string getLocale() * @method static int getMidDayAt() * @method static Carbon getTestNow() * @method static \Symfony\Component\Translation\TranslatorInterface getTranslator() * @method static int getWeekEndsAt() * @method static int getWeekStartsAt() * @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 Carbon instance($date) * @method static bool isImmutable() * @method static bool isModifiableUnit($unit) * @method static Carbon isMutable() * @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 void macro($name, $macro) * @method static Carbon|null make($var) * @method static Carbon maxValue() * @method static Carbon minValue() * @method static void mixin($mixin) * @method static Carbon now($tz = null) * @method static Carbon parse($time = null, $tz = null) * @method static string pluralUnit(string $unit) * @method static void resetMonthsOverflow() * @method static void resetToStringFormat() * @method static void resetYearsOverflow() * @method static void serializeUsing($callback) * @method static Carbon setHumanDiffOptions($humanDiffOptions) * @method static bool setLocale($locale) * @method static void setMidDayAt($hour) * @method static Carbon setTestNow($testNow = null) * @method static void setToStringFormat($format) * @method static void setTranslator(\Symfony\Component\Translation\TranslatorInterface $translator) * @method static Carbon setUtf8($utf8) * @method static void setWeekEndsAt($day) * @method static void setWeekStartsAt($day) * @method static void setWeekendDays($days) * @method static bool shouldOverflowMonths() * @method static bool shouldOverflowYears() * @method static string singularUnit(string $unit) * @method static Carbon today($tz = null) * @method static Carbon tomorrow($tz = null) * @method static void useMonthsOverflow($monthsOverflow = true) * @method static Carbon useStrictMode($strictModeEnabled = true) * @method static void useYearsOverflow($yearsOverflow = true) * @method static Carbon yesterday($tz = null) */ class DateFactory { /** * The default class that will be used for all created dates. * * @var string */ const DEFAULT_CLASS_NAME = Carbon::class; /** * The type (class) of dates that should be created. * * @var string */ protected static $dateClass; /** * This callable may be used to intercept date creation. * * @var callable */ protected static $callable; /** * The Carbon factory that should be used when creating dates. * * @var object */ protected static $factory; /** * Use the given handler when generating dates (class name, callable, or factory). * * @param mixed $handler * @return mixed * * @throws \InvalidArgumentException */ public static function use($handler) { if (is_callable($handler) && is_object($handler)) { return static::useCallable($handler); } elseif (is_string($handler)) { return static::useClass($handler); } elseif ($handler instanceof Factory) { return static::useFactory($handler); } throw new InvalidArgumentException('Invalid date creation handler. Please provide a class name, callable, or Carbon factory.'); } /** * Use the default date class when generating dates. * * @return void */ public static function useDefault() { static::$dateClass = null; static::$callable = null; static::$factory = null; } /** * Execute the given callable on each date creation. * * @param callable $callable * @return void */ public static function useCallable(callable $callable) { static::$callable = $callable; static::$dateClass = null; static::$factory = null; } /** * Use the given date type (class) when generating dates. * * @param string $dateClass * @return void */ public static function useClass($dateClass) { static::$dateClass = $dateClass; static::$factory = null; static::$callable = null; } /** * Use the given Carbon factory when generating dates. * * @param object $factory * @return void */ public static function useFactory($factory) { static::$factory = $factory; static::$dateClass = null; static::$callable = null; } /** * Handle dynamic calls to generate dates. * * @param string $method * @param array $parameters * @return mixed * * @throws \RuntimeException */ public function __call($method, $parameters) { $defaultClassName = static::DEFAULT_CLASS_NAME; // Using callable to generate dates... if (static::$callable) { return call_user_func(static::$callable, $defaultClassName::$method(...$parameters)); } // Using Carbon factory to generate dates... if (static::$factory) { return static::$factory->$method(...$parameters); } $dateClass = static::$dateClass ?: $defaultClassName; // Check if date can be created using public class method... if (method_exists($dateClass, $method) || method_exists($dateClass, 'hasMacro') && $dateClass::hasMacro($method)) { return $dateClass::$method(...$parameters); } // If that fails, create the date with the default class.. $date = $defaultClassName::$method(...$parameters); // If the configured class has an "instance" method, we'll try to pass our date into there... if (method_exists($dateClass, 'instance')) { return $dateClass::instance($date); } // Otherwise, assume the configured class has a DateTime compatible constructor... return new $dateClass($date->format('Y-m-d H:i:s.u'), $date->getTimezone()); } }
Save
cmd:
run