Запрос
класс Запрос расширяет Facade (Просмотреть исходный код)
Свойства
| статический защищенный Application|null | $app | Экземпляр приложения, к которому осуществляется фасадный доступ. | из Фасада |
| статический защищенный массив | $resolvedInstance | Результирующие экземпляры объектов. | из Фасада |
| статический защищенный bool | $cached | Указывает, следует ли кэшировать экземпляр. | из Фасада |
Методы
| static void | resolved(Closure $callback)
Выполнить замыкание, когда фасад был разрешен. | from Facade |
| static MockInterface | spy()
Преобразовать фасад в шпион Mockery. | from Facade |
| static MockInterface | partialMock()
Инициализировать частичный двойник на фасад. | from Facade |
| static Expectation | shouldReceive()
Инициализировать ожидание двойника на фасад. | from Facade |
| static Expectation | expects()
Инициализировать ожидание двойника на фасад. | from Facade |
| static MockInterface | createFreshMockInstance()
Создать новый экземпляр двойника для данного класса. | from Facade |
| static MockInterface | createMock()
Создать новый экземпляр двойника для данного класса. | from Facade |
| static bool | isMock()
Определяет, установлен ли двойник как экземпляр фасада. | from Facade |
| static string|null | getMockableClass()
Получить класс, который можно подменить двойником для связанного экземпляра. | from Facade |
| static void | swap(mixed $instance)
Произвести горячую замену базового экземпляра за фасадом. | from Facade |
| static bool | isFake()
Определяет, установлен ли "фейк" в качестве экземпляра фасада. | from Facade |
| static mixed | getFacadeRoot()
Получить корневый объект за фасадом. | from Facade |
| static string | getFacadeAccessor()
Получить зарегистрированное имя компонента. | |
| static mixed | resolveFacadeInstance(string $name)
Разрешить корневой экземпляр фасада из контейнера. | from Facade |
| static void | clearResolvedInstance(string $name)
Очистить разрешенный экземпляр фасада. | from Facade |
| static void | clearResolvedInstances()
Очистить все разрешенные экземпляры. | from Facade |
| static Collection | defaultAliases()
Получить стандартные псевдонимы приложения. | from Facade |
| static Application|null | getFacadeApplication()
Получить экземпляр приложения за фасадом. | from Facade |
| static void | setFacadeApplication(Application|null $app)
Установить экземпляр приложения. | from Facade |
| static mixed | __callStatic(string $method, array $args)
Обработать динамические статические вызовы к объекту. | from Facade |
| static Request | capture() Без описания | |
| static Request | instance() Без описания | |
| static string | method() Без описания | |
| static string | root() Без описания | |
| static string | url() Без описания | |
| static string | fullUrl() Без описания | |
| static string | fullUrlWithQuery(array $query) Без описания | |
| static string | fullUrlWithoutQuery(array|string $keys) Без описания | |
| static string | path() Без описания | |
| static string | decodedPath() Без описания | |
| static string|null | segment(int $index, string|null $default = null) Без описания | |
| static array | segments() Без описания | |
| static bool | is(mixed $patterns) Без описания | |
| static bool | routeIs(mixed $patterns) Без описания | |
| static bool | fullUrlIs(mixed $patterns) Без описания | |
| static string | host() Без описания | |
| static string | httpHost() Без описания | |
| static string | schemeAndHttpHost() Без описания | |
| static bool | ajax() Без описания | |
| static bool | pjax() Без описания | |
| static bool | prefetch() Без описания |
| static bool | secure() Без описания | |
| static string|null | ip() Без описания | |
| static array | ips() Без описания | |
| static string|null | userAgent() Без описания | |
| static Request | merge(array $input) Без описания | |
| static Request | mergeIfMissing(array $input) Без описания | |
| static Request | replace(array $input) Без описания | |
| static mixed | get(string $key, mixed $default = null) Без описания | |
| static InputBag|mixed | json(string|null $key = null, mixed $default = null) Без описания | |
| static Request | createFrom(Request $from, Request|null $to = null) Без описания | |
| static Request | createFromBase(Request $request) Без описания | |
| static Request | duplicate(array|null $query = null, array|null $request = null, array|null $attributes = null, array|null $cookies = null, array|null $files = null, array|null $server = null) Без описания | |
| static bool | hasSession(bool $skipIfUninitialized = false) Без описания | |
| static SessionInterface | getSession() Без описания | |
| static Session | session() Без описания | |
| static void | setLaravelSession(Session $session) Без описания | |
| static void | setRequestLocale(string $locale) Без описания | |
| static void | setDefaultRequestLocale(string $locale) Без описания | |
| static mixed | user(string|null $guard = null) Без описания | |
| static Route|object|string|null | route(string|null $param = null, mixed $default = null) Без описания | |
| static string | fingerprint() Без описания | |
| static Request | setJson(InputBag $json) Без описания | |
| static Closure | getUserResolver() Без описания | |
| static Request | setUserResolver(Closure $callback) Без описания | |
| static Closure | getRouteResolver() Без описания | |
| static Request | setRouteResolver(Closure $callback) Без описания | |
| static array | toArray() Без описания | |
| static void | initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], string|resource|null $content = null) Без описания | |
| static Request | createFromGlobals() Без описания | |
| static Request | create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], string|resource|null $content = null) Без описания | |
| static void | setFactory(callable|null $callable) Без описания | |
| static void | overrideGlobals() Без описания | |
| static void | setTrustedProxies(array $proxies, int $trustedHeaderSet) Без описания | |
| static string[] | getTrustedProxies() Без описания | |
| static int | getTrustedHeaderSet() Без описания | |
| static void | setTrustedHosts(array $hostPatterns) Без описания | |
| static string[] | getTrustedHosts() Без описания | |
| static string | normalizeQueryString(string|null $qs) Без описания | |
| static void | enableHttpMethodParameterOverride() Без описания | |
| static bool | getHttpMethodParameterOverride() Без описания | |
| static bool | hasPreviousSession() Без описания | |
| static void | setSession(SessionInterface $session) Без описания | |
| static array | getClientIps() Без описания |
| статический string|null | getClientIp() Без описания | |
| статический string | getScriptName() Без описания | |
| статический string | getPathInfo() Без описания | |
| статический string | getBasePath() Без описания | |
| статический string | getBaseUrl() Без описания | |
| статический string | getScheme() Без описания | |
| статический int|string|null | getPort() Без описания | |
| статический string|null | getUser() Без описания | |
| статический string|null | getPassword() Без описания | |
| статический string|null | getUserInfo() Без описания | |
| статический string | getHttpHost() Без описания | |
| статический string | getRequestUri() Без описания | |
| статический string | getSchemeAndHttpHost() Без описания | |
| статический string | getUri() Без описания | |
| статический string | getUriForPath(string $path) Без описания | |
| статический string | getRelativeUriForPath(string $path) Без описания | |
| статический string|null | getQueryString() Без описания | |
| статический bool | isSecure() Без описания | |
| статический string | getHost() Без описания | |
| статический void | setMethod(string $method) Без описания | |
| статический string | getMethod() Без описания | |
| статический string | getRealMethod() Без описания | |
| статический string|null | getMimeType(string $format) Без описания | |
| статический string[] | getMimeTypes(string $format) Без описания | |
| статический string|null | getFormat(string|null $mimeType) Без описания | |
| статический void | setFormat(string|null $format, string|string[] $mimeTypes) Без описания | |
| статический string|null | getRequestFormat(string|null $default = 'html') Без описания | |
| статический void | setRequestFormat(string|null $format) Без описания | |
| статический string|null | getContentTypeFormat() Без описания | |
| статический void | setDefaultLocale(string $locale) Без описания | |
| статический string | getDefaultLocale() Без описания | |
| статический void | setLocale(string $locale) Без описания | |
| статический string | getLocale() Без описания | |
| статический bool | isMethod(string $method) Без описания | |
| статический bool | isMethodSafe() Без описания | |
| статический bool | isMethodIdempotent() Без описания | |
| статический bool | isMethodCacheable() Без описания | |
| статический string|null | getProtocolVersion() Без описания | |
| статический string|resource | getContent(bool $asResource = false) Без описания | |
| статический InputBag | getPayload() Без описания | |
| статический array | getETags() Без описания | |
| статический bool | isNoCache() Без описания | |
| статический string|null | getPreferredFormat(string|null $default = 'html') Без описания | |
| статический string|null | getPreferredLanguage(string[] $locales = null) Без описания | |
| статический string[] | getLanguages() Без описания | |
| статический string[] | getCharsets() Без описания | |
| статический string[] | getEncodings() Без описания | |
| статический string[] | getAcceptableContentTypes() Без описания | |
| статический bool | isXmlHttpRequest() Без описания | |
| статический bool | preferSafeContent() Без описания | |
| статический bool | isFromTrustedProxy() Без описания | |
| статический array | filterPrecognitiveRules(array $rules) Без описания |
| static bool | isAttemptingPrecognition() Без описания | |
| static bool | isPrecognitive() Без описания | |
| static bool | isJson() Без описания | |
| static bool | expectsJson() Без описания | |
| static bool | wantsJson() Без описания | |
| static bool | accepts(string|array $contentTypes) Без описания | |
| static string|null | prefers(string|array $contentTypes) Без описания | |
| static bool | acceptsAnyContentType() Без описания | |
| static bool | acceptsJson() Без описания | |
| static bool | acceptsHtml() Без описания | |
| static bool | matchesType(string $actual, string $type) Без описания | |
| static string | format(string $default = 'html') Без описания | |
| static string|array|null | old(string|null $key = null, Model|string|array|null $default = null) Без описания | |
| static void | flash() Без описания | |
| static void | flashOnly(array|mixed $keys) Без описания | |
| static void | flashExcept(array|mixed $keys) Без описания | |
| static void | flush() Без описания | |
| static string|array|null | server(string|null $key = null, string|array|null $default = null) Без описания | |
| static bool | hasHeader(string $key) Без описания | |
| static string|array|null | header(string|null $key = null, string|array|null $default = null) Без описания | |
| static string|null | bearerToken() Без описания | |
| static bool | exists(string|array $key) Без описания | |
| static bool | has(string|array $key) Без описания | |
| static bool | hasAny(string|array $keys) Без описания | |
| static Request|mixed | whenHas(string $key, callable $callback, callable|null $default = null) Без описания | |
| static bool | filled(string|array $key) Без описания | |
| static bool | isNotFilled(string|array $key) Без описания | |
| static bool | anyFilled(string|array $keys) Без описания | |
| static Request|mixed | whenFilled(string $key, callable $callback, callable|null $default = null) Без описания | |
| static bool | missing(string|array $key) Без описания | |
| static Request|mixed | whenMissing(string $key, callable $callback, callable|null $default = null) Без описания | |
| static array | keys() Без описания | |
| static array | all(array|mixed|null $keys = null) Без описания | |
| static mixed | input(string|null $key = null, mixed $default = null) Без описания | |
| static Stringable | str(string $key, mixed $default = null) Без описания | |
| static Stringable | string(string $key, mixed $default = null) Без описания | |
| static bool | boolean(string|null $key = null, bool $default = false) Без описания | |
| static int | integer(string $key, int $default) Без описания | |
| static float | float(string $key, float $default) Без описания | |
| static Carbon|null | date(string $key, string|null $format = null, string|null $tz = null) Без описания | |
| static object|null | enum(string $key, string $enumClass) Без описания | |
| static Collection | collect(array|string|null $key = null) Без описания | |
| static array | only(array|mixed $keys) Без описания | |
| static array | except(array|mixed $keys) Без описания | |
| static string|array|null | query(string|null $key = null, string|array|null $default = null) Без описания | |
| static string|array|null | post(string|null $key = null, string|array|null $default = null) Без описания | |
| static bool | hasCookie(string $key) Без описания | |
| static string|array|null | cookie(string|null $key = null, string|array|null $default = null) Без описания | |
| static array | allFiles() Без описания |
| static bool | hasFile(string $key) Описание отсутствует | |
| static UploadedFile[]|array|null | file(string|null $key = null, mixed $default = null) Описание отсутствует | |
| static never | dd(mixed $keys) Описание отсутствует | |
| static Request | dump(mixed $keys = []) Описание отсутствует | |
| static void | macro(string $name, object|callable $macro) Описание отсутствует | |
| static void | mixin(object $mixin, bool $replace = true) Описание отсутствует | |
| static bool | hasMacro(string $name) Описание отсутствует | |
| static void | flushMacros() Описание отсутствует | |
| static array | validate(array $rules, mixed $params) Описание отсутствует | |
| static array | validateWithBag(string $errorBag, array $rules, mixed $params) Описание отсутствует | |
| static bool | hasValidSignature(bool $absolute = true) Описание отсутствует |
Подробности
static void resolved(Closure $callback)
Выполнить замыкание, когда фасад был разрешен.
static MockInterface spy()
Преобразовать фасад в шпион Mockery.
static MockInterface partialMock()
Инициализировать частичный макет на фасаде.
static Expectation shouldReceive()
Инициализировать ожидание макета на фасаде.
static Expectation expects()
Инициализировать ожидание макета на фасаде.
static protected MockInterface createFreshMockInstance()
Создать свежий экземпляр макета для данного класса.
static protected MockInterface createMock()
Создать свежий экземпляр макета для данного класса.
static protected bool isMock()
Определяет, установлен ли макет в качестве экземпляра фасада.
static protected string|null getMockableClass()
Получить класс, который можно смоделировать, для связанного экземпляра.
static void swap(mixed $instance)
Произвести обмен экземпляром по умолчанию под фасадом.
static protected bool isFake()
Определяет, установлен ли "фейк" в качестве экземпляра фасада.
static mixed getFacadeRoot()
Получить корневый объект за фасадом.
static protected string getFacadeAccessor()
Получить зарегистрированное имя компонента.
static protected mixed resolveFacadeInstance(string $name)
Разрешить корневой экземпляр фасада из контейнера.
static void clearResolvedInstance(string $name)
Очистить разрешенный экземпляр фасада.
static void clearResolvedInstances()
Очистить все разрешенные экземпляры.
static Collection defaultAliases()
Получить алиасы по умолчанию приложения.
static Application|null getFacadeApplication()
Получить экземпляр приложения за фасадом.
static void setFacadeApplication(Application|null $app)
Установить экземпляр приложения.
static mixed __callStatic(string $method, array $args)
Обработка динамических статических вызовов объекта.
static Request capture()
Без описания
static Request instance()
Без описания
static string method()
Без описания
static string root()
Без описания
static string url()
Без описания
static string fullUrl()
Без описания
static string fullUrlWithQuery(array $query)
Без описания
static string fullUrlWithoutQuery(array|string $keys)
Без описания
static string path()
Без описания
static string decodedPath()
Без описания
static string|null segment(int $index, string|null $default = null)
Без описания
static array segments()
Без описания
static bool is(mixed $patterns)
Без описания
static bool routeIs(mixed $patterns)
Без описания
static bool fullUrlIs(mixed $patterns)
Без описания
static string host()
Без описания
static string httpHost()
Без описания
static string schemeAndHttpHost()
Без описания
static bool ajax()
Без описания
static bool pjax()
Без описания
static bool prefetch()
Без описания
static bool secure()
Без описания
static string|null ip()
Без описания
static array ips()
Без описания
static string|null userAgent()
Без описания
static Request merge(array $input)
Без описания
static Запрос mergeIfMissing(array $input)
Описание отсутствует
static Запрос replace(array $input)
Описание отсутствует
static mixed get(string $key, mixed $default = null)
Описание отсутствует
static InputBag|mixed json(string|null $key = null, mixed $default = null)
Описание отсутствует
static Запрос createFromBase(Request $request)
Описание отсутствует
static Запрос duplicate(array|null $query = null, array|null $request = null, array|null $attributes = null, array|null $cookies = null, array|null $files = null, array|null $server = null)
Описание отсутствует
static bool hasSession(bool $skipIfUninitialized = false)
Описание отсутствует
static SessionInterface getSession()
Описание отсутствует
static Сессия session()
Описание отсутствует
static void setLaravelSession(Сессия $session)
Описание отсутствует
static void setRequestLocale(string $locale)
Описание отсутствует
static void setDefaultRequestLocale(string $locale)
Описание отсутствует
static mixed user(string|null $guard = null)
Описание отсутствует
static Route|object|string|null route(string|null $param = null, mixed $default = null)
Описание отсутствует
static string fingerprint()
Описание отсутствует
static Запрос setJson(InputBag $json)
Описание отсутствует
static Closure getUserResolver()
Описание отсутствует
static Closure getRouteResolver()
Без описания
static array toArray()
Без описания
static void initialize(array $query = [], array $request = [], array $attributes = [], array $cookies = [], array $files = [], array $server = [], string|resource|null $content = null)
Без описания
static Request createFromGlobals()
Без описания
static Request create(string $uri, string $method = 'GET', array $parameters = [], array $cookies = [], array $files = [], array $server = [], string|resource|null $content = null)
Без описания
static void setFactory(callable|null $callable)
Без описания
static void overrideGlobals()
Без описания
static void setTrustedProxies(array $proxies, int $trustedHeaderSet)
Без описания
static string[] getTrustedProxies()
Без описания
static int getTrustedHeaderSet()
Без описания
static void setTrustedHosts(array $hostPatterns)
Без описания
static string[] getTrustedHosts()
Без описания
static string normalizeQueryString(string|null $qs)
Без описания
static void enableHttpMethodParameterOverride()
Без описания
static bool getHttpMethodParameterOverride()
Без описания
static bool hasPreviousSession()
Без описания
static void setSession(SessionInterface $session)
Без описания
static array getClientIps()
Без описания
static string|null getClientIp()
Без описания
static string getScriptName()
Без описания
static string getPathInfo()
Без описания
static string getBasePath()
Без описания
static string getBaseUrl()
Без описания
static string getScheme()
Без описания
static int|string|null getPort()
Без описания
static string|null getUser()
Без описания
static string|null getPassword()
Без описания
static string|null getUserInfo()
Без описания
static string getHttpHost()
Без описания
static string getRequestUri()
Без описания
static string getSchemeAndHttpHost()
Без описания
static string getUri()
Без описания
static string getUriForPath(string $path)
Без описания
static string getRelativeUriForPath(string $path)
Без описания
static string|null getQueryString()
Без описания
static bool isSecure()
Без описания
static string getHost()
Без описания
static void setMethod(string $method)
Без описания
static string getMethod()
Без описания
static string getRealMethod()
Без описания
static string|null getMimeType(string $format)
Без описания
static string[] getMimeTypes(string $format)
Без описания
static string|null getFormat(string|null $mimeType)
Без описания
static void setFormat(string|null $format, string|string[] $mimeTypes)
Без описания
static string|null getRequestFormat(string|null $default = 'html')
Без описания
static void setRequestFormat(string|null $format)
Без описания
static string|null getContentTypeFormat()
Без описания
static void setDefaultLocale(string $locale)
Без описания
static string getDefaultLocale()
Без описания
static void setLocale(string $locale)
Без описания
static string getLocale()
Без описания
static bool isMethod(string $method)
Без описания
static bool isMethodSafe()
Без описания
static bool isMethodIdempotent()
Без описания
static bool isMethodCacheable()
Без описания
static string|null getProtocolVersion()
Без описания
static string|resource getContent(bool $asResource = false)
Без описания
static InputBag getPayload()
Без описания
static array getETags()
Без описания
static bool isNoCache()
Без описания
static string|null getPreferredFormat(string|null $default = 'html')
Без описания
static string|null getPreferredLanguage(string[] $locales = null)
Без описания
static string[] getLanguages()
Без описания
static string[] getCharsets()
Без описания
static string[] getEncodings()
Без описания
static string[] getAcceptableContentTypes()
Без описания
static bool isXmlHttpRequest()
Без описания
static bool preferSafeContent()
Без описания
static bool isFromTrustedProxy()
Без описания
static array filterPrecognitiveRules(array $rules)
Без описания
static bool isAttemptingPrecognition()
Без описания
static bool isPrecognitive()
Без описания
static bool isJson()
Без описания
static bool expectsJson()
Без описания
static bool wantsJson()
Без описания
static bool accepts(string|array $contentTypes)
Без описания
static string|null prefers(string|array $contentTypes)
Без описания
static bool acceptsAnyContentType()
Без описания
static bool acceptsJson()
Без описания
static bool acceptsHtml()
Без описания
static bool matchesType(string $actual, string $type)
Без описания
static string format(string $default = 'html')
Без описания
static string|array|null old(string|null $key = null, Model|string|array|null $default = null)
Без описания
static void flash()
Без описания
static void flashOnly(array|mixed $keys)
Без описания
static void flashExcept(array|mixed $keys)
Без описания
static void flush()
Без описания
static string|array|null server(string|null $key = null, string|array|null $default = null)
Без описания
static bool hasHeader(string $key)
Без описания
static string|array|null header(string|null $key = null, string|array|null $default = null)
Без описания
static string|null bearerToken()
Без описания
static bool exists(string|array $key)
Без описания
static bool has(string|array $key)
Без описания
static bool hasAny(string|array $keys)
Без описания
static Request|mixed whenHas(string $key, callable $callback, callable|null $default = null)
Без описания
static bool filled(string|array $key)
Без описания
static bool isNotFilled(string|array $key)
Без описания
static bool anyFilled(string|array $keys)
Без описания
static Request|mixed whenFilled(string $key, callable $callback, callable|null $default = null)
Без описания
static bool missing(string|array $key)
Без описания
static Request|mixed whenMissing(string $key, callable $callback, callable|null $default = null)
Описание отсутствует
static array keys()
Описание отсутствует
static array all(array|mixed|null $keys = null)
Описание отсутствует
static mixed input(string|null $key = null, mixed $default = null)
Описание отсутствует
static Stringable str(string $key, mixed $default = null)
Описание отсутствует
static Stringable string(string $key, mixed $default = null)
Описание отсутствует
static bool boolean(string|null $key = null, bool $default = false)
Описание отсутствует
static int integer(string $key, int $default)
Описание отсутствует
static float float(string $key, float $default)
Описание отсутствует
static Carbon|null date(string $key, string|null $format = null, string|null $tz = null)
Описание отсутствует
static object|null enum(string $key, string $enumClass)
Описание отсутствует
static Collection collect(array|string|null $key = null)
Описание отсутствует
static array only(array|mixed $keys)
Описание отсутствует
static array except(array|mixed $keys)
Описание отсутствует
static string|array|null query(string|null $key = null, string|array|null $default = null)
Описание отсутствует
static string|array|null post(string|null $key = null, string|array|null $default = null)
Описание отсутствует
static bool hasCookie(string $key)
Описание отсутствует
static string|array|null cookie(string|null $key = null, string|array|null $default = null)
Описание отсутствует
static array allFiles()
Описание отсутствует
static bool hasFile(string $key)
Описание отсутствует
static Файл[]|массив|null file(строка|null $key = null, смешанный $default = null)
Без описания
static никогда dd(смешанный $keys)
Без описания
static Запрос dump(смешанный $keys = [])
Без описания
static пустое значение macro(строка $name, объект|вызываемый $macro)
Без описания
static пустое значение mixin(объект $mixin, bool $replace = true)
Без описания
static логическое значение hasMacro(строка $name)
Без описания
static пустое значение flushMacros()
Без описания
static массив validate(массив $rules, смешанный $params)
Без описания
static массив validateWithBag(строка $errorBag, массив $rules, смешанный $params)
Без описания
static логическое значение hasValidSignature(bool $absolute = true)
Без описания
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Support/Facades/Request.html