X7ROOT File Manager
Current Path:
/home/prisjneg/public_html/vendor/laravel/framework/src/Illuminate/Support
home
/
prisjneg
/
public_html
/
vendor
/
laravel
/
framework
/
src
/
Illuminate
/
Support
/
📁
..
📄
AggregateServiceProvider.php
(995 B)
📄
Benchmark.php
(1.93 KB)
📄
Carbon.php
(1.25 KB)
📄
Composer.php
(6.86 KB)
📄
ConfigurationUrlParser.php
(4.25 KB)
📄
DateFactory.php
(7.76 KB)
📄
DefaultProviders.php
(3.07 KB)
📄
Env.php
(2.96 KB)
📁
Exceptions
📁
Facades
📄
Fluent.php
(4.14 KB)
📄
HigherOrderTapProxy.php
(665 B)
📄
HtmlString.php
(1.03 KB)
📄
InteractsWithTime.php
(1.55 KB)
📄
Js.php
(3.44 KB)
📄
LICENSE.md
(1.05 KB)
📄
Lottery.php
(5.66 KB)
📄
Manager.php
(4.42 KB)
📄
MessageBag.php
(10.09 KB)
📄
MultipleInstanceManager.php
(4.25 KB)
📄
NamespacedItemResolver.php
(3.35 KB)
📄
Number.php
(8.09 KB)
📄
Optional.php
(2.64 KB)
📄
Pluralizer.php
(2.84 KB)
📄
ProcessUtils.php
(2 KB)
📄
Reflector.php
(4.5 KB)
📄
ServiceProvider.php
(10.99 KB)
📄
Sleep.php
(10.56 KB)
📄
Str.php
(52.55 KB)
📄
Stringable.php
(33.36 KB)
📁
Testing
📄
Timebox.php
(1.62 KB)
📁
Traits
📄
ValidatedInput.php
(12.08 KB)
📄
ViewErrorBag.php
(2.57 KB)
📄
composer.json
(1.74 KB)
📄
helpers.php
(10.6 KB)
Editing: Reflector.php
<?php namespace Illuminate\Support; use ReflectionClass; use ReflectionEnum; use ReflectionMethod; use ReflectionNamedType; use ReflectionUnionType; class Reflector { /** * This is a PHP 7.4 compatible implementation of is_callable. * * @param mixed $var * @param bool $syntaxOnly * @return bool */ public static function isCallable($var, $syntaxOnly = false) { if (! is_array($var)) { return is_callable($var, $syntaxOnly); } if (! isset($var[0], $var[1]) || ! is_string($var[1] ?? null)) { return false; } if ($syntaxOnly && (is_string($var[0]) || is_object($var[0])) && is_string($var[1])) { return true; } $class = is_object($var[0]) ? get_class($var[0]) : $var[0]; $method = $var[1]; if (! class_exists($class)) { return false; } if (method_exists($class, $method)) { return (new ReflectionMethod($class, $method))->isPublic(); } if (is_object($var[0]) && method_exists($class, '__call')) { return (new ReflectionMethod($class, '__call'))->isPublic(); } if (! is_object($var[0]) && method_exists($class, '__callStatic')) { return (new ReflectionMethod($class, '__callStatic'))->isPublic(); } return false; } /** * Get the class name of the given parameter's type, if possible. * * @param \ReflectionParameter $parameter * @return string|null */ public static function getParameterClassName($parameter) { $type = $parameter->getType(); if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { return; } return static::getTypeName($parameter, $type); } /** * Get the class names of the given parameter's type, including union types. * * @param \ReflectionParameter $parameter * @return array */ public static function getParameterClassNames($parameter) { $type = $parameter->getType(); if (! $type instanceof ReflectionUnionType) { return array_filter([static::getParameterClassName($parameter)]); } $unionTypes = []; foreach ($type->getTypes() as $listedType) { if (! $listedType instanceof ReflectionNamedType || $listedType->isBuiltin()) { continue; } $unionTypes[] = static::getTypeName($parameter, $listedType); } return array_filter($unionTypes); } /** * Get the given type's class name. * * @param \ReflectionParameter $parameter * @param \ReflectionNamedType $type * @return string */ protected static function getTypeName($parameter, $type) { $name = $type->getName(); if (! is_null($class = $parameter->getDeclaringClass())) { if ($name === 'self') { return $class->getName(); } if ($name === 'parent' && $parent = $class->getParentClass()) { return $parent->getName(); } } return $name; } /** * Determine if the parameter's type is a subclass of the given type. * * @param \ReflectionParameter $parameter * @param string $className * @return bool */ public static function isParameterSubclassOf($parameter, $className) { $paramClassName = static::getParameterClassName($parameter); return $paramClassName && (class_exists($paramClassName) || interface_exists($paramClassName)) && (new ReflectionClass($paramClassName))->isSubclassOf($className); } /** * Determine if the parameter's type is a Backed Enum with a string backing type. * * @param \ReflectionParameter $parameter * @return bool */ public static function isParameterBackedEnumWithStringBackingType($parameter) { if (! $parameter->getType() instanceof ReflectionNamedType) { return false; } $backedEnumClass = $parameter->getType()?->getName(); if (is_null($backedEnumClass)) { return false; } if (enum_exists($backedEnumClass)) { $reflectionBackedEnum = new ReflectionEnum($backedEnumClass); return $reflectionBackedEnum->isBacked() && $reflectionBackedEnum->getBackingType()->getName() == 'string'; } return false; } }
Upload File
Create Folder