Запрос
класс Запрос расширяет Facade (View source)
Свойства
| static protected Application|null | $app | Экземпляр приложения, к которому обращается фасад. | из Фасада |
| static protected array | $resolvedInstance | Экземпляры разрешенных объектов. | из Фасада |
| static protected 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 Request | dump(mixed $keys = []) Описание отсутствует | |
| static never | dd(mixed $args) Описание отсутствует | |
| static void | macro(string $name, object|callable $macro = null) Описание отсутствует | |
| 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 Запрос capture()
Описание отсутствует
static Запрос 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 Запрос 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()
Без описания
статический 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()
Без описания
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)
Нет описания
статический UploadedFile[]|массив|null file(строка|null $key = null, смешанный $default = null)
Описание отсутствует
статический Запрос dump(смешанный $keys = [])
Описание отсутствует
статический никогда dd(смешанный $args)
Описание отсутствует
статический пустое значение macro(строка $name, объект|вызываемый $macro = null)
Описание отсутствует
статический пустое значение mixin(объект $mixin, логическое $replace = true)
Описание отсутствует
статический логическое значение hasMacro(строка $name)
Описание отсутствует
статический пустое значение flushMacros()
Описание отсутствует
статический массив validate(массив $rules, смешанный $params)
Описание отсутствует
статический массив validateWithBag(строка $errorBag, массив $rules, смешанный $params)
Описание отсутствует
статический логическое значение hasValidSignature(логическое $absolute = true)
Описание отсутствует
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Support/Facades/Request.html