prefix
stringlengths
512
512
suffix
stringlengths
256
256
middle
stringlengths
14
229
meta
dict
pace Illuminate\Auth\Access; trait HandlesAuthorization { /** * Create a new access response. * * @param string|null $message * @param mixed $code * @return \Illuminate\Auth\Access\Response */ protected function allow($message = null, $code = null) { return Respons...
ram string|null $message * @param int|null $code * @return \Illuminate\Auth\Access\Response */ public function denyWithStatus($status, $message = null, $code = null) { return Response::denyWithStatus($status, $message, $c
s\Response */ protected function deny($message = null, $code = null) { return Response::deny($message, $code); } /** * Deny with a HTTP status code. * * @param int $status * @pa
{ "filepath": "src/Illuminate/Auth/Access/HandlesAuthorization.php", "language": "php", "file_size": 1345, "cut_index": 524, "middle_length": 229 }
class Response implements Arrayable, Stringable { /** * Indicates whether the response was allowed. * * @var bool */ protected $allowed; /** * The response message. * * @var string|null */ protected $message; /** * The response code. * * @var...
$allowed; $this->message = $message; } /** * Create a new "allow" Response. * * @param string|null $message * @param mixed $code * @return \Illuminate\Auth\Access\Response */ public static function al
* @param bool $allowed * @param string|null $message * @param mixed $code */ public function __construct($allowed, $message = '', $code = null) { $this->code = $code; $this->allowed =
{ "filepath": "src/Illuminate/Auth/Access/Response.php", "language": "php", "file_size": 4364, "cut_index": 614, "middle_length": 229 }
ontract; use Illuminate\Support\Str; class Factory implements FactoryContract { /** * The Translator implementation. * * @var \Illuminate\Contracts\Translation\Translator */ protected $translator; /** * The Presence Verifier implementation. * * @var \Illuminate\Validatio...
* * @var array<string, \Closure|string> */ protected $implicitExtensions = []; /** * All of the custom dependent validator extensions. * * @var array<string, \Closure|string> */ protected $dependentExtensions = []
$container; /** * All of the custom validator extensions. * * @var array<string, \Closure|string> */ protected $extensions = []; /** * All of the custom implicit validator extensions.
{ "filepath": "src/Illuminate/Validation/Factory.php", "language": "php", "file_size": 9089, "cut_index": 716, "middle_length": 229 }
nate\Contracts\Validation\ImplicitRule; use Illuminate\Contracts\Validation\InvokableRule; use Illuminate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidationRule; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Translation\CreatesPotentiallyTranslatedStrings; class Invokabl...
d = false; /** * The validation error messages. * * @var array */ protected $messages = []; /** * The current validator. * * @var \Illuminate\Validation\Validator */ protected $validator; /**
ntracts\Validation\ValidationRule|\Illuminate\Contracts\Validation\InvokableRule */ protected $invokable; /** * Indicates if the validation invokable failed. * * @var bool */ protected $faile
{ "filepath": "src/Illuminate/Validation/InvokableValidationRule.php", "language": "php", "file_size": 3853, "cut_index": 614, "middle_length": 229 }
ion; use Illuminate\Contracts\Validation\CompilableRules; class NestedRules implements CompilableRules { /** * The callback to execute. * * @var callable */ protected $callback; /** * Create a new nested rule instance. * * @param callable $callback */ public ...
data * @param mixed $context * @return \stdClass */ public function compile($attribute, $value, $data = null, $context = null) { $rules = call_user_func($this->callback, $value, $attribute, $data, $context); return
* @param mixed $value * @param mixed $
{ "filepath": "src/Illuminate/Validation/NestedRules.php", "language": "php", "file_size": 906, "cut_index": 547, "middle_length": 52 }
ion; use Illuminate\Contracts\Validation\UncompromisedVerifier; use Illuminate\Support\Stringable; class NotPwnedVerifier implements UncompromisedVerifier { /** * The HTTP factory instance. * * @var \Illuminate\Http\Client\Factory */ protected $factory; /** * The number of seconds...
fy that the given data has not been compromised in public breaches. * * @param array $data * @return bool */ public function verify($data) { $value = $data['value']; $threshold = $data['threshold']; if
t\Factory $factory * @param int|null $timeout */ public function __construct($factory, $timeout = null) { $this->factory = $factory; $this->timeout = $timeout ?? 30; } /** * Veri
{ "filepath": "src/Illuminate/Validation/NotPwnedVerifier.php", "language": "php", "file_size": 2581, "cut_index": 563, "middle_length": 229 }
nate\Validation; interface PresenceVerifierInterface { /** * Count the number of objects in a collection having the given value. * * @param string $collection * @param string $column * @param string $value * @param int|null $excludeId * @param string|null $idColumn ...
alues. * * @param string $collection * @param string $column * @param array $values * @param array $extra * @return int */ public function getMultiCount($collection, $column, array $values, array $extra = []);
e number of objects in a collection with the given v
{ "filepath": "src/Illuminate/Validation/PresenceVerifierInterface.php", "language": "php", "file_size": 846, "cut_index": 535, "middle_length": 52 }
Validation\Rules\Enum; use Illuminate\Validation\Rules\ExcludeIf; use Illuminate\Validation\Rules\ExcludeUnless; use Illuminate\Validation\Rules\Exists; use Illuminate\Validation\Rules\File; use Illuminate\Validation\Rules\ImageFile; use Illuminate\Validation\Rules\In; use Illuminate\Validation\Rules\NotIn; use Illumin...
ability * @param mixed ...$arguments * @return \Illuminate\Validation\Rules\Can */ public static function can($ability, ...$arguments) { return new Can($ability, $arguments); } /** * Apply the given rules if t
ion\Rules\RequiredUnless; use Illuminate\Validation\Rules\StringRule; use Illuminate\Validation\Rules\Unique; class Rule { use Macroable; /** * Get a can constraint builder instance. * * @param string $
{ "filepath": "src/Illuminate/Validation/Rule.php", "language": "php", "file_size": 10352, "cut_index": 921, "middle_length": 229 }
nate\Foundation\Precognition; /** * Provides default implementation of ValidatesWhenResolved contract. */ trait ValidatesWhenResolvedTrait { /** * Validate the class instance. * * @return void */ public function validateResolved() { $this->prepareForValidation(); if (...
e data for validation. * * @return void */ protected function prepareForValidation() { // } /** * Get the validator instance for the request. * * @return \Illuminate\Validation\Validator */ pr
nstance->after(Precognition::afterValidationHook($this)); } if ($instance->fails()) { $this->failedValidation($instance); } $this->passedValidation(); } /** * Prepare th
{ "filepath": "src/Illuminate/Validation/ValidatesWhenResolvedTrait.php", "language": "php", "file_size": 2207, "cut_index": 563, "middle_length": 229 }
nate\Support\Arr; class ValidationData { /** * Initialize and gather data for the given attribute. * * @param string $attribute * @param array $masterData * @return array */ public static function initializeAndGatherData($attribute, $masterData) { $data = Arr::dot(...
izeAttributeOnData($attribute, $masterData) { $explicitPath = static::getLeadingExplicitAttributePath($attribute); $data = static::extractDataFromPath($explicitPath, $masterData); if (! str_contains($attribute, '*') || str_end
/** * Gather a copy of the attribute data filled with any missing attributes. * * @param string $attribute * @param array $masterData * @return array */ protected static function initial
{ "filepath": "src/Illuminate/Validation/ValidationData.php", "language": "php", "file_size": 2924, "cut_index": 563, "middle_length": 229 }
port\Facades\Validator as ValidatorFacade; class ValidationException extends Exception { /** * The validator instance. * * @var \Illuminate\Contracts\Validation\Validator */ public $validator; /** * The recommended response to send to the client. * * @var \Symfony\Compon...
e a new exception instance. * * @param \Illuminate\Contracts\Validation\Validator $validator * @param \Symfony\Component\HttpFoundation\Response|null $response * @param string $errorBag */ public function __construct($val
The name of the error bag. * * @var string */ public $errorBag; /** * The path the client should be redirected to. * * @var string|null */ public $redirectTo; /** * Creat
{ "filepath": "src/Illuminate/Validation/ValidationException.php", "language": "php", "file_size": 3747, "cut_index": 614, "middle_length": 229 }
te\Validation\Rules\Exists; use Illuminate\Validation\Rules\Numeric; use Illuminate\Validation\Rules\StringRule; use Illuminate\Validation\Rules\Unique; class ValidationRuleParser { /** * The data being validated. * * @var array */ public $data; /** * The implicit attributes. ...
ction explode($rules) { $this->implicitAttributes = []; $rules = $this->explodeRules($rules); return (object) [ 'rules' => $rules, 'implicitAttributes' => $this->implicitAttributes, ]; }
t(array $data) { $this->data = $data; } /** * Parse the human-friendly rules into a full rules array for the validator. * * @param array $rules * @return \stdClass */ public fun
{ "filepath": "src/Illuminate/Validation/ValidationRuleParser.php", "language": "php", "file_size": 10229, "cut_index": 921, "middle_length": 229 }
nate\Contracts\Support\DeferrableProvider; use Illuminate\Contracts\Validation\UncompromisedVerifier; use Illuminate\Http\Client\Factory as HttpFactory; use Illuminate\Support\ServiceProvider; class ValidationServiceProvider extends ServiceProvider implements DeferrableProvider { /** * Register the service pr...
{ $validator = new Factory($app['translator'], $app); // The validation presence verifier is responsible for determining the existence of // values in a given data collection which is typically a relational database or
erValidationFactory(); } /** * Register the validation factory. * * @return void */ protected function registerValidationFactory() { $this->app->singleton('validator', function ($app)
{ "filepath": "src/Illuminate/Validation/ValidationServiceProvider.php", "language": "php", "file_size": 2189, "cut_index": 563, "middle_length": 229 }
* @var \Illuminate\Support\MessageBag */ protected $messages; /** * The data under validation. * * @var array */ protected $data; /** * The initial rules provided. * * @var array */ protected $initialRules; /** * The rules to be applied to ...
@var callable|null */ protected $implicitAttributesFormatter; /** * The cached data for the "distinct" rule. * * @var array */ protected $distinctValues = []; /** * All of the registered "after" callbacks.
* The array of wildcard attributes with their asterisks expanded. * * @var array */ protected $implicitAttributes = []; /** * The callback that should be used to format the attribute. * *
{ "filepath": "src/Illuminate/Validation/Validator.php", "language": "php", "file_size": 46393, "cut_index": 2151, "middle_length": 229 }
te\Validation\Concerns; use Egulias\EmailValidator\EmailLexer; use Egulias\EmailValidator\Result\InvalidEmail; use Egulias\EmailValidator\Validation\EmailValidation; class FilterEmailValidation implements EmailValidation { /** * The flags to pass to the filter_var function. * * @var int|null *...
IL_UNICODE); } /** * Returns true if the given email is valid. * * @param string $email * @param \Egulias\EmailValidator\EmailLexer $emailLexer * @return bool */ public function isValid(string $email, EmailLex
gs = $flags; } /** * Create a new instance which allows any unicode characters in local-part. * * @return static */ public static function unicode() { return new static(FILTER_FLAG_EMA
{ "filepath": "src/Illuminate/Validation/Concerns/FilterEmailValidation.php", "language": "php", "file_size": 1639, "cut_index": 537, "middle_length": 229 }
exists. If a custom validation message is being used we'll return the // custom message, otherwise we'll keep searching for a valid message. if (! is_null($inlineMessage)) { return $inlineMessage; } $lowerRule = Str::snake($rule); $customKey = "validation.custom.{$...
for // only some attributes and rules that need to get specially formed. if ($customMessage !== $customKey) { return $customMessage; } // If the rule being validated is a "size" rule, we will need to gather the
e($attribute)}", $customKey] : $customKey ); // First we check for a custom defined validation message for the attribute // and rule. This allows the developer to specify specific messages
{ "filepath": "src/Illuminate/Validation/Concerns/FormatsMessages.php", "language": "php", "file_size": 19022, "cut_index": 1331, "middle_length": 229 }
declined_if rule. * * @param string $message * @param string $attribute * @param string $rule * @param array<int,string> $parameters * @return string */ protected function replaceDeclinedIf($message, $attribute, $rule, $parameters) { return $this->replaceAccep...
max'], $parameters, $message); } /** * Replace all place-holders for the date_format rule. * * @param string $message * @param string $attribute * @param string $rule * @param array<int,string> $parameters
* @param string $rule * @param array<int,string> $parameters * @return string */ protected function replaceBetween($message, $attribute, $rule, $parameters) { return str_replace([':min', ':
{ "filepath": "src/Illuminate/Validation/Concerns/ReplacesAttributes.php", "language": "php", "file_size": 29467, "cut_index": 1331, "middle_length": 229 }
ntRuleParameters($parameters); if (in_array($other, $values, is_bool($other) || is_null($other))) { return $this->validateRequired($attribute, $value) && in_array($value, $acceptable, true); } return true; } /** * Validate that an attribute is an active URL. * ...
ords !== []) { return true; } } catch (Exception) { return false; } } return false; } /** * Get the DNS records for the given hostname. * *
return false; } if ($url = parse_url($value, PHP_URL_HOST)) { try { $records = $this->getDnsRecords($url.'.', DNS_A | DNS_AAAA); if (is_array($records) && $rec
{ "filepath": "src/Illuminate/Validation/Concerns/ValidatesAttributes.php", "language": "php", "file_size": 85405, "cut_index": 3790, "middle_length": 229 }
Illuminate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Validator; use InvalidArgumentException; class AnyOf implements Rule, ValidatorAwareRule { /** * The rules to match against. * * @var array */...
throw new InvalidArgumentException('The provided value must be an array of validation rules.'); } $this->rules = $rules; } /** * Determine if the validation rule passes. * * @param string $attribute * @param
Sets the validation rules to match against. * * @param array $rules * * @throws \InvalidArgumentException */ public function __construct($rules) { if (! is_array($rules)) {
{ "filepath": "src/Illuminate/Validation/Rules/AnyOf.php", "language": "php", "file_size": 2205, "cut_index": 563, "middle_length": 229 }
<?php namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class ArrayRule implements Stringable { /** * The accepted keys. * * @var array */ protected $keys; /** * Create a new array rule...
ction __toString() { if (empty($this->keys)) { return 'array'; } $keys = array_map( static fn ($key) => enum_value($key), $this->keys, ); return 'array:'.implode(',', $keys);
$keys = $keys->toArray(); } $this->keys = is_array($keys) ? $keys : func_get_args(); } /** * Convert the rule to a validation string. * * @return string */ public fun
{ "filepath": "src/Illuminate/Validation/Rules/ArrayRule.php", "language": "php", "file_size": 1006, "cut_index": 512, "middle_length": 229 }
te\Validation\Rules; use Illuminate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Support\Facades\Gate; class Can implements Rule, ValidatorAwareRule { /** * The ability to check. * * @var string */ protected $ability; /** * The...
$this->ability = $ability; $this->arguments = $arguments; } /** * Determine if the validation rule passes. * * @param string $attribute * @param mixed $value * @return bool */ public function pa
ion\Validator */ protected $validator; /** * Constructor. * * @param string $ability * @param array $arguments */ public function __construct($ability, array $arguments = []) {
{ "filepath": "src/Illuminate/Validation/Rules/Can.php", "language": "php", "file_size": 1840, "cut_index": 537, "middle_length": 229 }
hp namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class Contains implements Stringable { /** * The values that should be contained in the attribute. * * @var array */ protected $values; /...
ring. * * @return string */ public function __toString() { $values = array_map(function ($value) { $value = enum_value($value); return '"'.str_replace('"', '""', (string) $value).'"'; }, $this
{ if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->values = is_array($values) ? $values : func_get_args(); } /** * Convert the rule to a validation st
{ "filepath": "src/Illuminate/Validation/Rules/Contains.php", "language": "php", "file_size": 1070, "cut_index": 515, "middle_length": 229 }
Support\enum_value; trait DatabaseRule { /** * The table to run the query against. * * @var string */ protected $table; /** * The column to check on. * * @var string */ protected $column; /** * The extra where clauses for the query. * * @var ...
table); } /** * Resolves the name of the table from the given string. * * @param string $table * @return string */ public function resolveTableName($table) { if (! str_contains($table, '\\') || ! class_ex
tance. * * @param string $table * @param string $column */ public function __construct($table, $column = 'NULL') { $this->column = $column; $this->table = $this->resolveTableName($
{ "filepath": "src/Illuminate/Validation/Rules/DatabaseRule.php", "language": "php", "file_size": 5480, "cut_index": 716, "middle_length": 229 }
Illuminate\Support\Traits\Conditionable; use Illuminate\Support\Traits\Macroable; use Stringable; class Date implements Stringable { use Conditionable, Macroable; /** * The format of the date. */ protected ?string $format = null; /** * The constraints for the date rule. */ pro...
public function afterToday(): static { return $this->after('today'); } /** * Ensure the date is before or equal to today. */ public function todayOrBefore(): static { return $this->beforeOrEqual('today');
return $this; } /** * Ensure the date is before today. */ public function beforeToday(): static { return $this->before('today'); } /** * Ensure the date is after today. */
{ "filepath": "src/Illuminate/Validation/Rules/Date.php", "language": "php", "file_size": 4123, "cut_index": 614, "middle_length": 229 }
able; class Dimensions implements Stringable { use Conditionable; /** * The constraints for the dimensions rule. * * @var array */ protected $constraints = []; /** * Create a new dimensions rule instance. * * @param array $constraints */ public function _...
public function height($value) { $this->constraints['height'] = $value; return $this; } /** * Set the "min width" constraint. * * @param int $value * @return $this */ public function minWidth
*/ public function width($value) { $this->constraints['width'] = $value; return $this; } /** * Set the "height" constraint. * * @param int $value * @return $this */
{ "filepath": "src/Illuminate/Validation/Rules/Dimensions.php", "language": "php", "file_size": 3222, "cut_index": 614, "middle_length": 229 }
hp namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class DoesntContain implements Stringable { /** * The values that should not be contained in the attribute. * * @var array */ protected $value...
validation string. * * @return string */ public function __toString() { $values = array_map(function ($value) { $value = enum_value($value); return '"'.str_replace('"', '""', (string) $value).'"';
ct($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->values = is_array($values) ? $values : func_get_args(); } /** * Convert the rule to a
{ "filepath": "src/Illuminate/Validation/Rules/DoesntContain.php", "language": "php", "file_size": 1090, "cut_index": 515, "middle_length": 229 }
minate\Support\Arr; use Illuminate\Support\Facades\Validator; use Illuminate\Support\Traits\Conditionable; use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; class Email implements Rule, DataAwareRule, ValidatorAwareRule { use Conditionable, Macroable; public bool $validateMxRecord = false...
* * @var array */ protected $data; /** * An array of custom rules that will be merged into the validation rules. * * @var array */ protected $customRules = []; /** * The error message after validation,
ublic bool $strictRfcCompliant = false; /** * The validator performing the validation. * * @var \Illuminate\Validation\Validator */ protected $validator; /** * The data under validation.
{ "filepath": "src/Illuminate/Validation/Rules/Email.php", "language": "php", "file_size": 6796, "cut_index": 716, "middle_length": 229 }
ate\Contracts\Validation\Rule; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Support\Arr; use Illuminate\Support\Traits\Conditionable; use Stringable; use TypeError; use function Illuminate\Support\enum_value; class Enum implements Rule, ValidatorAwareRule, Stringable { use Conditionable;...
d. * * @var array */ protected $except = []; /** * Create a new rule instance. * * @param class-string<\UnitEnum> $type */ public function __construct($type) { $this->type = $type; } /*
lidation\Validator */ protected $validator; /** * The cases that should be considered valid. * * @var array */ protected $only = []; /** * The cases that should be considered invali
{ "filepath": "src/Illuminate/Validation/Rules/Enum.php", "language": "php", "file_size": 4112, "cut_index": 614, "middle_length": 229 }
hp namespace Illuminate\Validation\Rules; use Closure; use InvalidArgumentException; use Stringable; class ExcludeIf implements Stringable { /** * The condition that validates the attribute. * * @var (\Closure(): bool)|bool */ public $condition; /** * Create a new exclude valida...
ean.'); } } /** * Convert the rule to a validation string. * * @return string */ public function __toString() { if (is_callable($this->condition)) { return call_user_func($this->condition) ?
{ if ($condition instanceof Closure || is_bool($condition)) { $this->condition = $condition; } else { throw new InvalidArgumentException('The provided condition must be a callable or bool
{ "filepath": "src/Illuminate/Validation/Rules/ExcludeIf.php", "language": "php", "file_size": 1085, "cut_index": 515, "middle_length": 229 }
hp namespace Illuminate\Validation\Rules; use Closure; use InvalidArgumentException; use Stringable; class ExcludeUnless implements Stringable { /** * The condition that validates the attribute. * * @var (\Closure(): bool)|bool */ public $condition; /** * Create a new exclude va...
boolean.'); } } /** * Convert the rule to a validation string. * * @return string */ public function __toString() { if (is_callable($this->condition)) { return call_user_func($this->condition
) { if ($condition instanceof Closure || is_bool($condition)) { $this->condition = $condition; } else { throw new InvalidArgumentException('The provided condition must be a callable or
{ "filepath": "src/Illuminate/Validation/Rules/ExcludeUnless.php", "language": "php", "file_size": 1089, "cut_index": 515, "middle_length": 229 }
class File implements Rule, DataAwareRule, ValidatorAwareRule { use Conditionable, Macroable; /** * The MIME types that the given file should match. This array may also contain file extensions. * * @var array */ protected $allowedMimetypes = []; /** * The extensions that the...
oding. * * @var string|null */ protected $encoding = null; /** * An array of custom rules that will be merged into the validation rules. * * @var array */ protected $customRules = []; /** * The erro
t */ protected $minimumFileSize = null; /** * The maximum size in kilobytes that the file can be. * * @var null|int */ protected $maximumFileSize = null; /** * The required file enc
{ "filepath": "src/Illuminate/Validation/Rules/File.php", "language": "php", "file_size": 9984, "cut_index": 921, "middle_length": 229 }
namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class In implements Stringable { /** * The name of the rule. * * @var string */ protected $rule = 'in'; /** * The accepted values. ...
/** * Convert the rule to a validation string. * * @return string * * @see \Illuminate\Validation\ValidationRuleParser::parseParameters */ public function __toString() { $values = array_map(function ($val
*/ public function __construct($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->values = is_array($values) ? $values : func_get_args(); }
{ "filepath": "src/Illuminate/Validation/Rules/In.php", "language": "php", "file_size": 1209, "cut_index": 518, "middle_length": 229 }
namespace Illuminate\Validation\Rules; use Illuminate\Contracts\Support\Arrayable; use Stringable; use function Illuminate\Support\enum_value; class NotIn implements Stringable { /** * The name of the rule. * * @var string */ protected $rule = 'not_in'; /** * The accepted value...
args(); } /** * Convert the rule to a validation string. * * @return string */ public function __toString() { $values = array_map(function ($value) { $value = enum_value($value); return
ring $values */ public function __construct($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->values = is_array($values) ? $values : func_get_
{ "filepath": "src/Illuminate/Validation/Rules/NotIn.php", "language": "php", "file_size": 1142, "cut_index": 518, "middle_length": 229 }
** * The constraints for the number rule. */ protected array $constraints = ['numeric']; /** * The field under validation must have a size between the given min and max (inclusive). * * @param int|float $min * @param int|float $max * @return $this */ public funct...
if ($max !== null) { $rule .= ','.$max; } return $this->addRule($rule); } /** * The field under validation must have a different value than field. * * @param string $field * @return $this */
number of decimal places. * * @param int $min * @param int|null $max * @return $this */ public function decimal(int $min, ?int $max = null): Numeric { $rule = 'decimal:'.$min;
{ "filepath": "src/Illuminate/Validation/Rules/Numeric.php", "language": "php", "file_size": 5498, "cut_index": 716, "middle_length": 229 }
/** * The authenticatable model. * * @var \Illuminate\Contracts\Auth\Authenticatable|null */ public $user; /** * The ability being evaluated. * * @var string */ public $ability; /** * The result of the evaluation. * * @var bool|null */ ...
$user * @param string $ability * @param bool|null $result * @param array $arguments */ public function __construct($user, $ability, $result, $arguments) { $this->user = $user; $this->ability = $ability;
ram \Illuminate\Contracts\Auth\Authenticatable|null
{ "filepath": "src/Illuminate/Auth/Access/Events/GateEvaluated.php", "language": "php", "file_size": 969, "cut_index": 582, "middle_length": 52 }
losure; use Illuminate\Contracts\Auth\Access\Gate; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Collection; use function Illuminate\Support\enum_value; class Authorize { /** * The gate instance. * * @var \Illuminate\Contracts\Auth\Access\Gate */ protected $gate; /** ...
ty, ...$models) { return static::class.':'.implode(',', [enum_value($ability), ...$models]); } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param
te; } /** * Specify the ability and models for the middleware. * * @param \UnitEnum|string $ability * @param string ...$models * @return string */ public static function using($abili
{ "filepath": "src/Illuminate/Auth/Middleware/Authorize.php", "language": "php", "file_size": 2682, "cut_index": 563, "middle_length": 229 }
losure; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Route; use Symfony\Component\HttpFoundation\Response; class RedirectIfAuthenticated { /** * The callback that should be used to generate the authentication redirect path. * * @var callable|null ...
e\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next */ public function handle(Request $request, Closure $next, string ...$guards): Response { $guards = empty($guards) ? [null] : $guards; foreach ($guards as $g
g */ public static function using($guard, ...$others) { return static::class.':'.implode(',', [$guard, ...$others]); } /** * Handle an incoming request. * * @param \Closure(\Illuminat
{ "filepath": "src/Illuminate/Auth/Middleware/RedirectIfAuthenticated.php", "language": "php", "file_size": 2403, "cut_index": 563, "middle_length": 229 }
e Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Lang; class ResetPassword extends Notification { /** * The password reset token. * * @var string */ public $token; /** * The callback that should be used to create the reset password URL. * * @var (\...
*/ public function __construct(#[\SensitiveParameter] $token) { $this->token = $token; } /** * Get the notification's channels. * * @param mixed $notifiable * @return array|string */ public funct
d, string): \Illuminate\Notifications\Messages\MailMessage|\Illuminate\Contracts\Mail\Mailable)|null */ public static $toMailCallback; /** * Create a notification instance. * * @param string $token
{ "filepath": "src/Illuminate/Auth/Notifications/ResetPassword.php", "language": "php", "file_size": 3565, "cut_index": 614, "middle_length": 229 }
r string */ protected $key; /** * The previous / legacy encryption keys. * * @var array */ protected $previousKeys = []; /** * The algorithm used for encryption. * * @var string */ protected $cipher; /** * The supported cipher algorithms and t...
aram string $cipher * * @throws \RuntimeException */ public function __construct($key, $cipher = 'aes-128-cbc') { $key = (string) $key; if (! static::supported($key, $cipher)) { $ciphers = implode(', ',
ad' => false], 'aes-128-gcm' => ['size' => 16, 'aead' => true], 'aes-256-gcm' => ['size' => 32, 'aead' => true], ]; /** * Create a new encrypter instance. * * @param string $key * @p
{ "filepath": "src/Illuminate/Encryption/Encrypter.php", "language": "php", "file_size": 11347, "cut_index": 921, "middle_length": 229 }
Illuminate\Contracts\Support\Arrayable; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Support\Arr; use Illuminate\Support\Collection; class AnonymousEvent implements ShouldBroadcast { use Dispatchable, InteractsWithBroadcasting, InteractsWithSockets; /** * The connection the event should ...
if the event should be broadcast synchronously. */ protected bool $shouldBroadcastNow = false; /** * Create a new anonymous broadcastable event instance. */ public function __construct(protected Channel|array|string $channels)
yload the event should be broadcast with. */ protected array $payload = []; /** * Should the broadcast include the current user. */ protected bool $includeCurrentUser = true; /** * Indicates
{ "filepath": "src/Illuminate/Broadcasting/AnonymousEvent.php", "language": "php", "file_size": 3376, "cut_index": 614, "middle_length": 229 }
namespace Illuminate\Broadcasting; use Illuminate\Http\Request; use Illuminate\Routing\Controller; use Illuminate\Support\Facades\Broadcast; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; class BroadcastController extends Controller { /** * Authenticate the request for channel access....
ticating-users/#user-authentication. * * @param \Illuminate\Http\Request $request * @return array|null * * @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException */ public function authenticateUser(Req
sion()) { $request->session()->reflash(); } return Broadcast::auth($request); } /** * Authenticate the current user. * * See: https://pusher.com/docs/channels/server_api/authen
{ "filepath": "src/Illuminate/Broadcasting/BroadcastController.php", "language": "php", "file_size": 1238, "cut_index": 518, "middle_length": 229 }
namespace Illuminate\Broadcasting; use Illuminate\Contracts\Broadcasting\Broadcaster as BroadcasterContract; use Illuminate\Contracts\Broadcasting\Factory as BroadcastingFactory; use Illuminate\Contracts\Support\DeferrableProvider; use Illuminate\Support\ServiceProvider; class BroadcastServiceProvider extends Servic...
$this->app->alias( BroadcastManager::class, BroadcastingFactory::class ); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [
oadcastManager::class, fn ($app) => new BroadcastManager($app)); $this->app->singleton(BroadcasterContract::class, function ($app) { return $app->make(BroadcastManager::class)->connection(); });
{ "filepath": "src/Illuminate/Broadcasting/BroadcastServiceProvider.php", "language": "php", "file_size": 1136, "cut_index": 518, "middle_length": 229 }
racts\Cache\Repository as Cache; use Illuminate\Support\InteractsWithTime; class WithoutOverlapping { use InteractsWithTime; /** * The job's unique key used for preventing overlaps. * * @var string */ public $key; /** * The number of seconds before a job should be available a...
* @var bool */ public $shareKey = false; /** * Create a new middleware instance. * * @param string $key * @param \DateTimeInterface|int|null $releaseAfter * @param \DateTimeInterface|int $expiresAfter
* @var int */ public $expiresAfter; /** * The prefix of the lock key. * * @var string */ public $prefix = 'laravel-queue-overlap:'; /** * Share the key across different jobs. *
{ "filepath": "src/Illuminate/Queue/Middleware/WithoutOverlapping.php", "language": "php", "file_size": 3684, "cut_index": 614, "middle_length": 229 }
te\Broadcasting; use Illuminate\Contracts\Events\Dispatcher; use function Illuminate\Support\enum_value; class PendingBroadcast { /** * The event dispatcher implementation. * * @var \Illuminate\Contracts\Events\Dispatcher */ protected $events; /** * The event instance. * ...
* @param \UnitEnum|string|null $connection * @return $this */ public function via($connection = null) { if (method_exists($this->event, 'broadcastVia')) { $this->event->broadcastVia(enum_value($connection));
ed $event */ public function __construct(Dispatcher $events, $event) { $this->event = $event; $this->events = $events; } /** * Broadcast the event using a specific broadcaster. *
{ "filepath": "src/Illuminate/Broadcasting/PendingBroadcast.php", "language": "php", "file_size": 1549, "cut_index": 537, "middle_length": 229 }
luminate\Support\Str; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; /** * @author Matthew Hall (matthall28@gmail.com) * @author Taylor Otwell (taylor@laravel.com) */ class AblyBroadcaster extends Broadcaster { /** * The AblyRest SDK instance. * * @var \Ably\AblyRest *...
tion\AccessDeniedHttpException */ public function auth($request) { $channelName = $this->normalizeChannelName($request->channel_name); if (empty($request->channel_name) || ($this->isGuardedChannel($request->channel
s->ably = $ably; } /** * Authenticate the incoming request for a given channel. * * @param \Illuminate\Http\Request $request * @return mixed * * @throws \Symfony\Component\HttpKernel\Excep
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/AblyBroadcaster.php", "language": "php", "file_size": 6633, "cut_index": 716, "middle_length": 229 }
hp namespace Illuminate\Broadcasting\Broadcasters; use Psr\Log\LoggerInterface; class LogBroadcaster extends Broadcaster { /** * The logger implementation. * * @var \Psr\Log\LoggerInterface */ protected $logger; /** * Create a new broadcaster instance. * * @param \Psr...
broadcast(array $channels, $event, array $payload = []) { $channels = implode(', ', $this->formatChannels($channels)); $payload = json_encode($payload, JSON_PRETTY_PRINT); $this->logger->info('Broadcasting ['.$event.'] on cha
ction auth($request) { // } /** * {@inheritdoc} */ public function validAuthenticationResponse($request, $result) { // } /** * {@inheritdoc} */ public function
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/LogBroadcaster.php", "language": "php", "file_size": 1064, "cut_index": 515, "middle_length": 229 }
nection; use Illuminate\Redis\Connections\PredisClusterConnection; use Illuminate\Redis\Connections\PredisConnection; use Illuminate\Support\Arr; use Predis\Connection\Cluster\RedisCluster; use Predis\Connection\ConnectionException; use RedisException; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpExceptio...
tected $prefix = ''; /** * Create a new broadcaster instance. * * @param \Illuminate\Contracts\Redis\Factory $redis * @param string|null $connection * @param string $prefix */ public function __construct(Redis $
tected $redis; /** * The Redis connection to use for broadcasting. * * @var string|null */ protected $connection = null; /** * The Redis key prefix. * * @var string */ pro
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php", "language": "php", "file_size": 5533, "cut_index": 716, "middle_length": 229 }
te\Validation; use Illuminate\Contracts\Validation\Rule as RuleContract; use Illuminate\Contracts\Validation\ValidatorAwareRule; use Illuminate\Translation\CreatesPotentiallyTranslatedStrings; class ClosureValidationRule implements RuleContract, ValidatorAwareRule { use CreatesPotentiallyTranslatedStrings; /...
alidator */ protected $validator; /** * Create a new Closure based validation rule. * * @param \Closure $callback */ public function __construct($callback) { $this->callback = $callback; } /**
ool */ public $failed = false; /** * The validation error messages. * * @var array */ public $messages = []; /** * The current validator. * * @var \Illuminate\Validation\V
{ "filepath": "src/Illuminate/Validation/ClosureValidationRule.php", "language": "php", "file_size": 1955, "cut_index": 537, "middle_length": 229 }
ace; class DatabasePresenceVerifier implements DatabasePresenceVerifierInterface { /** * The database connection instance. * * @var \Illuminate\Database\ConnectionResolverInterface */ protected $db; /** * The database connection to use. * * @var string */ protec...
* @param string $value * @param int|null $excludeId * @param string|null $idColumn * @param array $extra * @return int */ public function getCount($collection, $column, $value, $excludeId = null, $idColumn = null, arra
nnectionResolverInterface $db) { $this->db = $db; } /** * Count the number of objects in a collection having the given value. * * @param string $collection * @param string $column
{ "filepath": "src/Illuminate/Validation/DatabasePresenceVerifier.php", "language": "php", "file_size": 3664, "cut_index": 614, "middle_length": 229 }
; use Illuminate\Contracts\Auth\Factory as Auth; use Illuminate\Contracts\Auth\Middleware\AuthenticatesRequests; use Illuminate\Http\Request; class Authenticate implements AuthenticatesRequests { /** * The authentication factory instance. * * @var \Illuminate\Contracts\Auth\Factory */ prote...
uards for the middleware. * * @param string $guard * @param string $others * @return string */ public static function using($guard, ...$others) { return static::class.':'.implode(',', [$guard, ...$others]);
* * Create a new middleware instance. * * @param \Illuminate\Contracts\Auth\Factory $auth */ public function __construct(Auth $auth) { $this->auth = $auth; } /** * Specify the g
{ "filepath": "src/Illuminate/Auth/Middleware/Authenticate.php", "language": "php", "file_size": 3315, "cut_index": 614, "middle_length": 229 }
namespace Illuminate\Auth\Middleware; use Closure; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\Facades\URL; class EnsureEmailIsVerified { /** * Specify the redirect route for the middleware. * * @param string $route * @retur...
sure $next, $redirectToRoute = null) { if (! $request->user() || ($request->user() instanceof MustVerifyEmail && ! $request->user()->hasVerifiedEmail())) { return $request->expectsJson() ? abo
e\Http\Request $request * @param \Closure $next * @param string|null $redirectToRoute * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse|null */ public function handle($request, Clo
{ "filepath": "src/Illuminate/Auth/Middleware/EnsureEmailIsVerified.php", "language": "php", "file_size": 1191, "cut_index": 518, "middle_length": 229 }
losure; use Illuminate\Contracts\Routing\ResponseFactory; use Illuminate\Contracts\Routing\UrlGenerator; use Illuminate\Support\Facades\Date; class RequirePassword { /** * The response factory instance. * * @var \Illuminate\Contracts\Routing\ResponseFactory */ protected $responseFactory; ...
g\UrlGenerator $urlGenerator * @param int|null $passwordTimeout */ public function __construct(ResponseFactory $responseFactory, UrlGenerator $urlGenerator, $passwordTimeout = null) { $this->responseFactory = $responseFactory;
@var int */ protected $passwordTimeout; /** * Create a new middleware instance. * * @param \Illuminate\Contracts\Routing\ResponseFactory $responseFactory * @param \Illuminate\Contracts\Routin
{ "filepath": "src/Illuminate/Auth/Middleware/RequirePassword.php", "language": "php", "file_size": 2935, "cut_index": 563, "middle_length": 229 }
ntracts\Support\Arrayable; use Illuminate\Queue\Attributes\Backoff; use Illuminate\Queue\Attributes\DeleteWhenMissingModels; use Illuminate\Queue\Attributes\MaxExceptions; use Illuminate\Queue\Attributes\ReadsQueueAttributes; use Illuminate\Queue\Attributes\Timeout; use Illuminate\Queue\Attributes\Tries; use Illuminate...
e timing out. * * @var int */ public $timeout; /** * The number of seconds to wait before retrying the job when encountering an uncaught exception. * * @var int */ public $backoff; /** * The maximum
ance. * * @var mixed */ public $event; /** * The number of times the job may be attempted. * * @var int */ public $tries; /** * The number of seconds the job can run befor
{ "filepath": "src/Illuminate/Broadcasting/BroadcastEvent.php", "language": "php", "file_size": 6051, "cut_index": 716, "middle_length": 229 }
e\Support\enum_value; trait InteractsWithBroadcasting { /** * The broadcaster connection to use to broadcast the event. * * @var array */ protected $broadcastConnection = [null]; /** * Broadcast the event using a specific broadcaster. * * @param \UnitEnum|array|string|n...
: Arr::wrap($connection); return $this; } /** * Get the broadcaster connections the event should be broadcast on. * * @return array */ public function broadcastConnections() { return $this->broadcastCon
_null($connection) ? [null]
{ "filepath": "src/Illuminate/Broadcasting/InteractsWithBroadcasting.php", "language": "php", "file_size": 931, "cut_index": 606, "middle_length": 52 }
pace Illuminate\Broadcasting; use Illuminate\Container\Container; use Illuminate\Contracts\Cache\Repository; use Illuminate\Contracts\Queue\ShouldBeUnique; class UniqueBroadcastEvent extends BroadcastEvent implements ShouldBeUnique { /** * The unique lock identifier. * * @var mixed */ publ...
'uniqueId')) { $this->uniqueId .= $event->uniqueId; } if (method_exists($event, 'uniqueFor')) { $this->uniqueFor = $event->uniqueFor(); } elseif (property_exists($event, 'uniqueFor')) { $this->un
* * @param mixed $event */ public function __construct($event) { if (method_exists($event, 'uniqueId')) { $this->uniqueId .= $event->uniqueId(); } elseif (property_exists($event,
{ "filepath": "src/Illuminate/Broadcasting/UniqueBroadcastEvent.php", "language": "php", "file_size": 1460, "cut_index": 524, "middle_length": 229 }
her\Pusher; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; class PusherBroadcaster extends Broadcaster { use UsePusherChannelConventions; /** * The Pusher SDK instance. * * @var \Pusher\Pusher */ protected $pusher; /** * Indicates if JSONP callbacks are...
incoming connection request. * * See: https://pusher.com/docs/channels/library_auth_reference/auth-signatures/#user-authentication * See: https://pusher.com/docs/channels/server_api/authenticating-users/#response * * @param \Illum
*/ public function __construct(Pusher $pusher, bool $allowJsonp = false) { $this->pusher = $pusher; $this->allowJsonp = $allowJsonp; } /** * Resolve the authenticated user payload for an
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php", "language": "php", "file_size": 5846, "cut_index": 716, "middle_length": 229 }
nate\Support\Fluent; class ConditionalRules { /** * The boolean condition indicating if the rules should be added to the attribute. * * @var callable|bool */ protected $condition; /** * The rules to be added to the attribute. * * @var \Illuminate\Contracts\Validation\Val...
ed $defaultRules; /** * Create a new conditional rules instance. * * @param callable|bool $condition * @param \Illuminate\Contracts\Validation\ValidationRule|\Illuminate\Contracts\Validation\InvokableRule|\Illuminate\Contracts\V
e attribute if the condition fails. * * @var \Illuminate\Contracts\Validation\ValidationRule|\Illuminate\Contracts\Validation\InvokableRule|\Illuminate\Contracts\Validation\Rule|\Closure|array|string */ protect
{ "filepath": "src/Illuminate/Validation/ConditionalRules.php", "language": "php", "file_size": 2424, "cut_index": 563, "middle_length": 229 }
pace Illuminate\Auth\Middleware; use Closure; use Illuminate\Contracts\Auth\Factory as AuthFactory; class AuthenticateWithBasicAuth { /** * The guard factory instance. * * @var \Illuminate\Contracts\Auth\Factory */ protected $auth; /** * Create a new middleware instance. * ...
d = null) { return static::class.':'.implode(',', func_get_args()); } /** * Handle an incoming request. * * @param \Illuminate\Http\Request $request * @param \Closure $next * @param string|null $guard
d field for the middleware. * * @param string|null $guard * @param string|null $field * @return string * * @named-arguments-supported */ public static function using($guard = null, $fiel
{ "filepath": "src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php", "language": "php", "file_size": 1349, "cut_index": 524, "middle_length": 229 }
e Illuminate\Notifications\Notification; use Illuminate\Support\Carbon; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\Lang; use Illuminate\Support\Facades\URL; class VerifyEmail extends Notification { /** * The callback that should be used to create the verify email URL. * * ...
n array|string */ public function via($notifiable) { return ['mail']; } /** * Build the mail representation of the notification. * * @param mixed $notifiable * @return \Illuminate\Notifications\Messages\M
inate\Notifications\Messages\MailMessage|\Illuminate\Contracts\Mail\Mailable)|null */ public static $toMailCallback; /** * Get the notification's channels. * * @param mixed $notifiable * @retur
{ "filepath": "src/Illuminate/Auth/Notifications/VerifyEmail.php", "language": "php", "file_size": 3330, "cut_index": 614, "middle_length": 229 }
Illuminate\Bus\UniqueLock; use Illuminate\Contracts\Broadcasting\Factory as FactoryContract; use Illuminate\Contracts\Broadcasting\ShouldBeUnique; use Illuminate\Contracts\Broadcasting\ShouldBroadcastNow; use Illuminate\Contracts\Broadcasting\ShouldRescue; use Illuminate\Contracts\Bus\Dispatcher as BusDispatcherContra...
se Psr\Log\LoggerInterface; use Pusher\Pusher; use ReflectionException; use RuntimeException; use Throwable; use function Illuminate\Support\enum_value; /** * @mixin \Illuminate\Contracts\Broadcasting\Broadcaster */ class BroadcastManager implements Fa
e\Attributes\Queue as QueueAttribute; use Illuminate\Queue\Attributes\ReadsQueueAttributes; use Illuminate\Support\Queue\Concerns\ResolvesQueueRoutes; use Illuminate\Support\RebindsCallbacksToSelf; use InvalidArgumentException; u
{ "filepath": "src/Illuminate/Broadcasting/BroadcastManager.php", "language": "php", "file_size": 15753, "cut_index": 921, "middle_length": 229 }
on; use Illuminate\Support\Reflector; use ReflectionClass; use ReflectionFunction; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; abstract class Broadcaster implements BroadcasterContract { /** * The callback to resolve the authenticated user information. * * @var \Closure|nul...
rotected $bindingRegistrar; /** * Resolve the authenticated user payload for the incoming connection request. * * See: https://pusher.com/docs/channels/library_auth_reference/auth-signatures/#user-authentication. * * @param \
The registered channel options. * * @var array */ protected $channelOptions = []; /** * The binding registrar instance. * * @var \Illuminate\Contracts\Routing\BindingRegistrar */ p
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php", "language": "php", "file_size": 11133, "cut_index": 921, "middle_length": 229 }
nate\Support\ServiceProvider; use Illuminate\Support\Str; use Laravel\SerializableClosure\SerializableClosure; class EncryptionServiceProvider extends ServiceProvider { /** * Register the service provider. * * @return void */ public function register() { $this->registerEncrypter...
rray_map( fn ($key) => $this->parseKey(['key' => $key]), $config['previous_keys'] ?? [] )); }); } /** * Configure Serializable Closure signing for security. * * @return
$this->app->singleton('encrypter', function ($app) { $config = $app->make('config')->get('app'); return (new Encrypter($this->parseKey($config), $config['cipher'])) ->previousKeys(a
{ "filepath": "src/Illuminate/Encryption/EncryptionServiceProvider.php", "language": "php", "file_size": 2145, "cut_index": 563, "middle_length": 229 }
?php namespace Illuminate\Broadcasting\Broadcasters; use Illuminate\Support\Str; trait UsePusherChannelConventions { /** * Return true if the channel is protected by authentication. * * @param string $channel * @return bool */ public function isGuardedChannel($channel) { ...
foreach (['private-encrypted-', 'private-', 'presence-'] as $prefix) { if (Str::startsWith($channel, $prefix)) { return Str::replaceFirst($prefix, '', $channel); } } return $channel; } }
ublic function normalizeChannelName($channel) {
{ "filepath": "src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php", "language": "php", "file_size": 821, "cut_index": 513, "middle_length": 52 }
protected $userResolver; /** * All of the defined abilities. * * @var array */ protected $abilities = []; /** * All of the defined policies. * * @var array */ protected $policies = []; /** * All of the registered before callbacks. * * @var ...
h\Access\Response|null */ protected $defaultDenialResponse; /** * The callback to be used to guess policy names. * * @var callable|null */ protected $guessPolicyNamesUsingCallback; /** * Create a new gate ins
ll of the defined abilities using class@method notation. * * @var array */ protected $stringCallbacks = []; /** * The default denial response for gates and policies. * * @var \Illuminate\Aut
{ "filepath": "src/Illuminate/Auth/Access/Gate.php", "language": "php", "file_size": 26962, "cut_index": 1331, "middle_length": 229 }
te\Cache; class DynamoDbLock extends Lock { /** * The DynamoDB client instance. * * @var \Illuminate\Cache\DynamoDbStore */ protected $dynamo; /** * Create a new lock instance. * * @param \Illuminate\Cache\DynamoDbStore $dynamo * @param string $name * @para...
->dynamo->add($this->name, $this->owner, $this->seconds); } return $this->dynamo->add($this->name, $this->owner, 86400); } /** * Release the lock. * * @return bool */ public function release() {
onds, $owner); $this->dynamo = $dynamo; } /** * Attempt to acquire the lock. * * @return bool */ public function acquire() { if ($this->seconds > 0) { return $this
{ "filepath": "src/Illuminate/Cache/DynamoDbLock.php", "language": "php", "file_size": 1562, "cut_index": 537, "middle_length": 229 }
e\Support\Carbon; use Illuminate\Support\LazyCollection; class RedisTagSet extends TagSet { /** * Add a reference entry to the tag set's underlying sorted set. * * @param string $key * @param int|null $ttl * @param string|null $updateWhen * @return void */ public functi...
tore->getPrefix().$tagKey, $ttl, $key); } } } /** * Get all of the cache entry keys for the tag set. * * @return \Illuminate\Support\LazyCollection */ public function entries() { $connection
tagKey) { if ($updateWhen) { $this->store->connection()->zadd($this->store->getPrefix().$tagKey, $updateWhen, $ttl, $key); } else { $this->store->connection()->zadd($this->s
{ "filepath": "src/Illuminate/Cache/RedisTagSet.php", "language": "php", "file_size": 3910, "cut_index": 614, "middle_length": 229 }
nnections\PhpRedisConnection; use Illuminate\Redis\Connections\PredisClusterConnection; use Illuminate\Redis\Connections\PredisConnection; use function Illuminate\Support\enum_value; class RedisTaggedCache extends TaggedCache { /** * Store an item in the cache if the key does not exist. * * @param ...
$this->itemKey($key), $seconds ); } } return parent::add($key, $value, $ttl); } /** * Store an item in the cache. * * @param \UnitEnum|string $key * @p
l) { $key = enum_value($key); $seconds = null; if ($ttl !== null) { $seconds = $this->getSeconds($ttl); if ($seconds > 0) { $this->tags->addEntry(
{ "filepath": "src/Illuminate/Cache/RedisTaggedCache.php", "language": "php", "file_size": 5931, "cut_index": 716, "middle_length": 229 }
se Illuminate\Cache\Events\WritingManyKeys; use Illuminate\Cache\Limiters\ConcurrencyLimiterBuilder; use Illuminate\Contracts\Cache\CanFlushLocks; use Illuminate\Contracts\Cache\LockProvider; use Illuminate\Contracts\Cache\Repository as CacheContract; use Illuminate\Contracts\Cache\Store; use Illuminate\Contracts\Event...
le { __call as macroCall; } /** * The cache store implementation. * * @var \Illuminate\Contracts\Cache\Store */ protected $store; /** * The event dispatcher implementation. * * @var \Illuminate\C
use function Illuminate\Support\defer; use function Illuminate\Support\enum_value; /** * @mixin \Illuminate\Contracts\Cache\Store */ class Repository implements ArrayAccess, CacheContract { use InteractsWithTime, Macroab
{ "filepath": "src/Illuminate/Cache/Repository.php", "language": "php", "file_size": 28327, "cut_index": 1331, "middle_length": 229 }
pace Illuminate\Cache; use Illuminate\Support\Collection; trait RetrievesMultipleKeys { /** * Retrieve multiple items from the cache by key. * * Items not found in the cache will have a null value. * * @param array $keys * @return array */ public function many(array $keys)...
turn $return; } /** * Store multiple items in the cache for a given number of seconds. * * @param array $values * @param int $seconds * @return bool */ public function putMany(array $values, $seconds) {
->all(); foreach ($keys as $key => $default) { /** @phpstan-ignore arguments.count (some clients don't accept a default) */ $return[$key] = $this->get($key, $default); } re
{ "filepath": "src/Illuminate/Cache/RetrievesMultipleKeys.php", "language": "php", "file_size": 1280, "cut_index": 524, "middle_length": 229 }
n; use Illuminate\Support\InteractsWithTime; class SessionStore implements Store { use InteractsWithTime, RetrievesMultipleKeys; /** * The key for cache items. * * @var string */ public $key; /** * The session instance. * * @var \Illuminate\Contracts\Session\Session...
tring, array{value: mixed, expiresAt: float}> */ public function all() { return $this->session->get($this->key, []); } /** * Retrieve an item from the cache by key. * * @param string $key * @return mixed
blic function __construct($session, $key = '_cache') { $this->key = $key; $this->session = $session; } /** * Get all of the cached values and their expiration times. * * @return array<s
{ "filepath": "src/Illuminate/Cache/SessionStore.php", "language": "php", "file_size": 4777, "cut_index": 614, "middle_length": 229 }
ments Store { use InteractsWithTime, RetrievesMultipleKeys; /** * The filesystem disk instance. * * @var \Illuminate\Contracts\Filesystem\Filesystem */ protected $disk; /** * The storage path where cache files should be written. * * @var string */ protected ...
@param string $directory * @param string $prefix * @param array|bool|null $serializableClasses */ public function __construct(Filesystem $disk, $directory = '', $prefix = '', $serializableClasses = null) { $this->disk =
alization. * * @var array|bool|null */ protected $serializableClasses; /** * Create a new storage cache store instance. * * @param \Illuminate\Contracts\Filesystem\Filesystem $disk *
{ "filepath": "src/Illuminate/Cache/StorageStore.php", "language": "php", "file_size": 7252, "cut_index": 716, "middle_length": 229 }
Contracts\Cache\Store; class TagSet { /** * The cache store implementation. * * @var \Illuminate\Contracts\Cache\Store */ protected $store; /** * The tag names. * * @var array */ protected $names = []; /** * Create a new TagSet instance. * * ...
the tag and return the new tag identifier. * * @param string $name * @return string */ public function resetTag($name) { $this->store->forever($this->tagKey($name), $id = str_replace('.', '', uniqid('', true)));
$this->names = $names; } /** * Reset all tags in the set. * * @return void */ public function reset() { array_walk($this->names, $this->resetTag(...)); } /** * Reset
{ "filepath": "src/Illuminate/Cache/TagSet.php", "language": "php", "file_size": 2500, "cut_index": 563, "middle_length": 229 }
Cache\Events\CacheFlushed; use Illuminate\Cache\Events\CacheFlushing; use Illuminate\Contracts\Cache\Store; use function Illuminate\Support\enum_value; class TaggedCache extends Repository { use RetrievesMultipleKeys { putMany as putManyAlias; } /** * The tag set instance. * * @var...
given number of seconds. * * @param array $values * @param int|null $ttl * @return bool */ public function putMany(array $values, $ttl = null) { if ($ttl === null) { return $this->putManyForever($val
inate\Cache\TagSet $tags */ public function __construct(Store $store, TagSet $tags) { parent::__construct($store); $this->tags = $tags; } /** * Store multiple items in the cache for a
{ "filepath": "src/Illuminate/Cache/TaggedCache.php", "language": "php", "file_size": 2884, "cut_index": 563, "middle_length": 229 }
key. * * @var mixed */ public $key; /** * The maximum number of attempts allowed within the given number of seconds. * * @var int */ public $maxAttempts; /** * The number of seconds until the rate limit is reset. * * @var int */ public $decay...
ds */ public function __construct($key = '', int $maxAttempts = 60, int $decaySeconds = 60) { $this->key = $key; $this->maxAttempts = $maxAttempts; $this->decaySeconds = $decaySeconds; } /** * Create a new
generator callback. * * @var callable */ public $responseCallback; /** * Create a new limit instance. * * @param mixed $key * @param int $maxAttempts * @param int $decaySecon
{ "filepath": "src/Illuminate/Cache/RateLimiting/Limit.php", "language": "php", "file_size": 3836, "cut_index": 614, "middle_length": 229 }
?php namespace Illuminate\Cache\Console; use Illuminate\Console\MigrationGeneratorCommand; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'make:cache-table', aliases: ['cache:table'])] class CacheTableCommand extends MigrationGeneratorCommand { /** * The console command name. * ...
n string */ protected function migrationTableName() { return 'cache'; } /** * Get the path to the migration stub file. * * @return string */ protected function migrationStubFile() { return _
/** * The console command description. * * @var string */ protected $description = 'Create a migration for the cache database table'; /** * Get the migration table name. * * @retur
{ "filepath": "src/Illuminate/Cache/Console/CacheTableCommand.php", "language": "php", "file_size": 1034, "cut_index": 513, "middle_length": 229 }
ger; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; #[AsCommand(name: 'cache:clear')] class ClearCommand extends Command { /** * The con...
uminate\Filesystem\Filesystem */ protected $files; /** * Create a new cache clear command instance. * * @param \Illuminate\Cache\CacheManager $cache * @param \Illuminate\Filesystem\Filesystem $files */ public
ription = 'Flush the application cache'; /** * The cache manager instance. * * @var \Illuminate\Cache\CacheManager */ protected $cache; /** * The filesystem instance. * * @var \Ill
{ "filepath": "src/Illuminate/Cache/Console/ClearCommand.php", "language": "php", "file_size": 4543, "cut_index": 614, "middle_length": 229 }
pace Illuminate\Cache\Console; use Illuminate\Cache\CacheManager; use Illuminate\Console\Command; use Symfony\Component\Console\Attribute\AsCommand; #[AsCommand(name: 'cache:forget')] class ForgetCommand extends Command { /** * The console command name. * * @var string */ protected $signat...
* * @param \Illuminate\Cache\CacheManager $cache */ public function __construct(CacheManager $cache) { parent::__construct(); $this->cache = $cache; } /** * Execute the console command. * * @
scription = 'Remove an item from the cache'; /** * The cache manager instance. * * @var \Illuminate\Cache\CacheManager */ protected $cache; /** * Create a new cache clear command instance.
{ "filepath": "src/Illuminate/Cache/Console/ForgetCommand.php", "language": "php", "file_size": 1288, "cut_index": 524, "middle_length": 229 }
pace Illuminate\Cache\Console; use Illuminate\Cache\CacheManager; use Illuminate\Console\Command; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputArgument; #[AsCommand(name: 'cache:prune-stale-tags')] class PruneStaleTagsCommand extends Command { /** * The console ...
andle(CacheManager $cache) { $cache = $cache->store($this->argument('store')); if (method_exists($cache->getStore(), 'flushStaleTags')) { $cache->flushStaleTags(); } $this->components->info('Stale cache tag
$description = 'Prune stale cache tags from the cache (Redis only)'; /** * Execute the console command. * * @param \Illuminate\Cache\CacheManager $cache * @return int|null */ public function h
{ "filepath": "src/Illuminate/Cache/Console/PruneStaleTagsCommand.php", "language": "php", "file_size": 1315, "cut_index": 524, "middle_length": 229 }
luminate\Support\Sleep; use Illuminate\Support\Str; use Throwable; class ConcurrencyLimiter { /** * The cache store instance. * * @var \Illuminate\Contracts\Cache\LockProvider */ protected $store; /** * The name of the limiter. * * @var string */ protected $name...
maxLocks * @param int $releaseAfter */ public function __construct($store, $name, $maxLocks, $releaseAfter) { $this->name = $name; $this->store = $store; $this->maxLocks = $maxLocks; $this->releaseAfter =
* @var int */ protected $releaseAfter; /** * Create a new concurrency limiter instance. * * @param \Illuminate\Contracts\Cache\LockProvider $store * @param string $name * @param int $
{ "filepath": "src/Illuminate/Cache/Limiters/ConcurrencyLimiter.php", "language": "php", "file_size": 2728, "cut_index": 563, "middle_length": 229 }
ncyLimiterBuilder { use InteractsWithTime; /** * The cache repository or Redis connection. * * @var \Illuminate\Cache\Repository */ public $connection; /** * The name of the lock. * * @var string */ public $name; /** * The maximum number of entitie...
onds to wait between attempts to acquire the lock. * * @var int */ public $sleep = 250; /** * Create a new builder instance. * * @param mixed $connection * @param string $name */ public function __co
* * @var int */ public $releaseAfter = 60; /** * The number of seconds to block until a lock is available. * * @var int */ public $timeout = 3; /** * The number of millisec
{ "filepath": "src/Illuminate/Cache/Limiters/ConcurrencyLimiterBuilder.php", "language": "php", "file_size": 3261, "cut_index": 614, "middle_length": 229 }
of the cache store. * * @var string|null */ public $storeName; /** * The key of the event. * * @var string */ public $key; /** * The tags that were assigned to the key. * * @var array */ public $tags; /** * Create a new event instan...
y = $key; $this->tags = $tags; } /** * Set the tags for the cache event. * * @param array $tags * @return $this */ public function setTags($tags) { $this->tags = $tags; return $this;
$this->storeName = $storeName; $this->ke
{ "filepath": "src/Illuminate/Cache/Events/CacheEvent.php", "language": "php", "file_size": 918, "cut_index": 606, "middle_length": 52 }
vents; class WritingManyKeys extends CacheEvent { /** * The keys that are being written. * * @var mixed */ public $keys; /** * The value that is being written. * * @var mixed */ public $values; /** * The number of seconds the keys should be valid. ...
param array $tags */ public function __construct($storeName, $keys, $values, $seconds = null, $tags = []) { parent::__construct($storeName, $keys[0], $tags); $this->keys = $keys; $this->values = $values; $thi
$values * @param int|null $seconds * @
{ "filepath": "src/Illuminate/Cache/Events/WritingManyKeys.php", "language": "php", "file_size": 886, "cut_index": 547, "middle_length": 52 }
namespace Illuminate\Http; use Illuminate\Support\Str; trait FileHelpers { /** * The cache copy of the file's hash name. * * @var string|null */ protected $hashName = null; /** * Get the fully-qualified path to the file. * * @return string */ public function p...
= rtrim($path, '/').'/'; } $hash = $this->hashName ?: $this->hashName = Str::random(40); if ($extension = $this->guessExtension()) { $extension = '.'.$extension; } return $path.$hash.$extension; }
->guessExtension(); } /** * Get a filename for the file. * * @param string|null $path * @return string */ public function hashName($path = null) { if ($path) { $path
{ "filepath": "src/Illuminate/Http/FileHelpers.php", "language": "php", "file_size": 1209, "cut_index": 518, "middle_length": 229 }
s\Support\Jsonable; use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; use JsonSerializable; use Symfony\Component\HttpFoundation\JsonResponse as BaseJsonResponse; class JsonResponse extends BaseJsonResponse { use ResponseTrait, Macroable { Macroable::__call as macroCall; } /**...
} /** * {@inheritdoc} * * @return static */ #[\Override] public static function fromJsonString(?string $data = null, int $status = 200, array $headers = []): static { return new static($data, $status, $header
on */ public function __construct($data = null, $status = 200, $headers = [], $options = 0, $json = false) { $this->encodingOptions = $options; parent::__construct($data, $status, $headers, $json);
{ "filepath": "src/Illuminate/Http/JsonResponse.php", "language": "php", "file_size": 3555, "cut_index": 614, "middle_length": 229 }
nate\Support\Traits\ForwardsCalls; use Illuminate\Support\Traits\Macroable; use Illuminate\Support\Uri; use Illuminate\Support\ViewErrorBag; use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile; use Symfony\Component\HttpFoundation\RedirectResponse as BaseRedirectResponse; class RedirectRespon...
* * @param string|array $key * @param mixed $value * @return $this */ public function with($key, $value = null) { $key = is_array($key) ? $key : [$key => $value]; foreach ($key as $k => $v) {
minate\Http\Request */ protected $request; /** * The session store instance. * * @var \Illuminate\Session\Store */ protected $session; /** * Flash a piece of data to the session.
{ "filepath": "src/Illuminate/Http/RedirectResponse.php", "language": "php", "file_size": 6682, "cut_index": 716, "middle_length": 229 }
e) * @method bool hasValidRelativeSignature() * @method bool hasValidSignatureWhileIgnoring($ignoreQuery = [], $absolute = true) * @method bool hasValidRelativeSignatureWhileIgnoring($ignoreQuery = []) */ class Request extends SymfonyRequest implements Arrayable, ArrayAccess { use Concerns\CanBePrecognitive, ...
p\UploadedFile|\Illuminate\Http\UploadedFile[]> */ protected $convertedFiles; /** * The user resolver callback. * * @var \Closure */ protected $userResolver; /** * The route resolver callback. * * @
ON content for the request. * * @var \Symfony\Component\HttpFoundation\InputBag|null */ protected $json; /** * All of the converted files for the request. * * @var array<int, \Illuminate\Htt
{ "filepath": "src/Illuminate/Http/Request.php", "language": "php", "file_size": 20279, "cut_index": 1331, "middle_length": 229 }
luminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Renderable; use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; use JsonSerializable; use Symfony\Component\HttpFoundation\Response as SymfonyResponse; use Symfony\Component\HttpFoundation\ResponseHeaderBag; class Response extends...
seHeaderBag($headers); $this->setContent($content); $this->setStatusCode($status); $this->setProtocolVersion('1.0'); } /** * Get the response content. */ #[\Override] public function getContent(): string|
ram int $status * @param array $headers * * @throws \InvalidArgumentException */ public function __construct($content = '', $status = 200, array $headers = []) { $this->headers = new Respon
{ "filepath": "src/Illuminate/Http/Response.php", "language": "php", "file_size": 3307, "cut_index": 614, "middle_length": 229 }
omponent\HttpFoundation\HeaderBag; use Throwable; trait ResponseTrait { /** * The original content of the response. * * @var mixed */ public $original; /** * The exception that triggered the error response (if applicable). * * @var \Throwable|null */ public $exc...
ng */ public function content() { return $this->getContent(); } /** * Get the original response content. * * @return mixed */ public function getOriginalContent() { $original = $this->origin
Get the status text for the response. * * @return string */ public function statusText() { return $this->statusText; } /** * Get the content of the response. * * @return stri
{ "filepath": "src/Illuminate/Http/ResponseTrait.php", "language": "php", "file_size": 4144, "cut_index": 614, "middle_length": 229 }
stem\Factory as FilesystemFactory; use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Http\Testing\FileFactory; use Illuminate\Support\Arr; use Illuminate\Support\Traits\Macroable; use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUploadedFile; class UploadedFile extends SymfonyUp...
function store($path = '', $options = []) { return $this->storeAs($path, $this->hashName(), $this->parseOptions($options)); } /** * Store the uploaded file on a filesystem disk with public visibility. * * @param string
) { return new FileFactory; } /** * Store the uploaded file on a filesystem disk. * * @param string $path * @param array|string $options * @return string|false */ public
{ "filepath": "src/Illuminate/Http/UploadedFile.php", "language": "php", "file_size": 4121, "cut_index": 614, "middle_length": 229 }
ry instance. * * @var \Illuminate\Http\Client\Factory */ protected $factory; /** * The array of requests. * * @var array<array-key, \Illuminate\Http\Client\PendingRequest> */ protected $requests = []; /** * The total number of requests that belong to the batch. ...
* * @var callable */ protected $handler; /** * The callback to run before the first request from the batch runs. * * @var (\Closure($this): void)|null */ protected $beforeCallback = null; /** * The c
public $pendingRequests = 0; /** * The total number of requests that have failed. * * @var non-negative-int */ public $failedRequests = 0; /** * The handler function for the Guzzle client.
{ "filepath": "src/Illuminate/Http/Client/Batch.php", "language": "php", "file_size": 12179, "cut_index": 921, "middle_length": 229 }
able; use Illuminate\Support\Traits\Macroable; use InvalidArgumentException; use PHPUnit\Framework\Assert as PHPUnit; /** * @mixin \Illuminate\Http\Client\PendingRequest */ class Factory { use Macroable { __call as macroCall; } /** * The event dispatcher implementation. * * @var \...
\Illuminate\Support\Collection */ protected $stubCallbacks; /** * Indicates if the factory is recording requests and responses. * * @var bool */ protected $recording = false; /** * The recorded response array
iddleware = []; /** * The options to apply to every request. * * @var \Closure|array */ protected $globalOptions = []; /** * The stub callables that will handle requests. * * @var
{ "filepath": "src/Illuminate/Http/Client/Factory.php", "language": "php", "file_size": 16602, "cut_index": 921, "middle_length": 229 }
g */ protected $baseUrl = ''; /** * The parameters that can be substituted into the URL. * * @var array */ protected $urlParameters = []; /** * The request body format. * * @var string */ protected $bodyFormat; /** * The raw body for the reque...
protected $transferStats; /** * The request options. * * @var array */ protected $options = []; /** * A callback to run when throwing if a server or client error occurs. * * @var \Closure */ protect
ected $pendingFiles = []; /** * The request cookies. * * @var array */ protected $cookies; /** * The transfer stats for the request. * * @var \GuzzleHttp\TransferStats */
{ "filepath": "src/Illuminate/Http/Client/PendingRequest.php", "language": "php", "file_size": 56513, "cut_index": 2151, "middle_length": 229 }
eHttp\Utils; /** * @mixin \Illuminate\Http\Client\Factory */ class Pool { /** * The factory instance. * * @var \Illuminate\Http\Client\Factory */ protected $factory; /** * The handler function for the Guzzle client. * * @var callable */ protected $handler; ...
andler(); } /** * Add a request to the pool with a numeric index. * * @return \Illuminate\Http\Client\PendingRequest|\GuzzleHttp\Promise\Promise */ public function newRequest() { return $this->pool[] = $this->as
* * @param \Illuminate\Http\Client\Factory|null $factory */ public function __construct(?Factory $factory = null) { $this->factory = $factory ?: new Factory(); $this->handler = Utils::chooseH
{ "filepath": "src/Illuminate/Http/Client/Pool.php", "language": "php", "file_size": 2173, "cut_index": 563, "middle_length": 229 }
ption; class Request implements ArrayAccess { use Macroable; /** * The underlying PSR request. * * @var \Psr\Http\Message\RequestInterface */ protected $request; /** * The decoded payload for the request. * * @var array */ protected $data; /** * T...
*/ public function method() { return $this->request->getMethod(); } /** * Get the URL of the request. * * @return string */ public function url() { return (string) $this->request->getUri();
* * @param \Psr\Http\Message\RequestInterface $request */ public function __construct($request) { $this->request = $request; } /** * Get the request method. * * @return string
{ "filepath": "src/Illuminate/Http/Client/Request.php", "language": "php", "file_size": 7221, "cut_index": 716, "middle_length": 229 }
eHttp\Psr7\Message; class RequestException extends HttpClientException { /** * The response instance. * * @var \Illuminate\Http\Client\Response */ public $response; /** * The current truncation length for the exception message. * * @var int|false|null */ public ...
sponse * @param int|false|null $truncateExceptionsAt */ public function __construct(Response $response, $truncateExceptionsAt = null) { $this->truncateExceptionsAt = $truncateExceptionsAt; $this->response = $response;
the response has been summarized in the message. * * @var bool */ public $hasBeenSummarized = false; /** * Create a new exception instance. * * @param \Illuminate\Http\Client\Response $re
{ "filepath": "src/Illuminate/Http/Client/RequestException.php", "language": "php", "file_size": 2884, "cut_index": 563, "middle_length": 229 }
esStatusCode, Tappable, Macroable { __call as macroCall; } /** * The underlying PSR response. * * @var \Psr\Http\Message\ResponseInterface */ protected $response; /** * The decoded JSON response. * * @var array */ protected $decoded; /** * ...
* * @var \GuzzleHttp\TransferStats|null */ public $transferStats; /** * The length at which request exceptions will be truncated. * * @var int<1, max>|false|null */ protected $truncateExceptionsAt = null; /**
THROW_ON_ERROR> */ protected int $decodingFlags; /** * The request cookies. * * @var \GuzzleHttp\Cookie\CookieJar */ public $cookies; /** * The transfer stats for the request.
{ "filepath": "src/Illuminate/Http/Client/Response.php", "language": "php", "file_size": 15020, "cut_index": 921, "middle_length": 229 }
tOfBoundsException; class ResponseSequence { use Macroable; /** * The responses in the sequence. * * @var array */ protected $responses; /** * Indicates that invoking this sequence when it is empty should throw an exception. * * @var bool */ protected $fail...
to the sequence. * * @param string|array|null $body * @param int $status * @param array $headers * @return $this */ public function push($body = null, int $status = 200, array $headers = []) { return $th
/** * Create a new response sequence. * * @param array $responses */ public function __construct(array $responses) { $this->responses = $responses; } /** * Push a response
{ "filepath": "src/Illuminate/Http/Client/ResponseSequence.php", "language": "php", "file_size": 3993, "cut_index": 614, "middle_length": 229 }
Dispatcher; use RuntimeException; use Throwable; class FailoverStore extends TaggableStore implements CanFlushLocks, LockProvider { /** * The caches which failed on the last action. * * @var list<string> */ protected array $failingCaches = []; /** * Create a new failover store. ...
, func_get_args()); } /** * Retrieve multiple items from the cache by key. * * Items not found in the cache will have a null value. * * @return array */ public function many(array $keys) { return $this
tores ) { } /** * Retrieve an item from the cache by key. * * @param string $key * @return mixed */ public function get($key) { return $this->attemptOnAllStores(__FUNCTION__
{ "filepath": "src/Illuminate/Cache/FailoverStore.php", "language": "php", "file_size": 6846, "cut_index": 716, "middle_length": 229 }
anFlushLocks, LockProvider, Store { use InteractsWithTime, RetrievesMultipleKeys; /** * The Illuminate Filesystem instance. * * @var \Illuminate\Filesystem\Filesystem */ protected $files; /** * The file cache directory. * * @var string */ protected $director...
* Create a new file cache store instance. * * @param \Illuminate\Filesystem\Filesystem $files * @param string $directory * @param int|null $filePermission * @param array|bool|null $serializableClasses */ public fu
* * @var int|null */ protected $filePermission; /** * The classes that should be allowed during unserialization. * * @var array|bool|null */ protected $serializableClasses; /**
{ "filepath": "src/Illuminate/Cache/FileStore.php", "language": "php", "file_size": 12611, "cut_index": 921, "middle_length": 229 }
e\Contracts\Cache\LockTimeoutException; use Illuminate\Support\Carbon; use Illuminate\Support\InteractsWithTime; use Illuminate\Support\Sleep; use Illuminate\Support\Str; abstract class Lock implements LockContract { use InteractsWithTime; /** * The name of the lock. * * @var string */ ...
250; /** * Create a new lock instance. * * @param string $name * @param int $seconds * @param string|null $owner */ public function __construct($name, $seconds, $owner = null) { if (is_null($owner))
* * @var string */ protected $owner; /** * The number of milliseconds to wait before re-attempting to acquire a lock while blocking. * * @var int */ protected $sleepMilliseconds =
{ "filepath": "src/Illuminate/Cache/Lock.php", "language": "php", "file_size": 4188, "cut_index": 614, "middle_length": 229 }