File manager - Edit - /home/autoph/public_html/projects/aha-api/vendor/laravel/framework/src/Illuminate/Validation/Rules/In.php
Back
<?php 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. * * @var array */ protected $values; /** * Create a new in rule instance. * * @param \Illuminate\Contracts\Support\Arrayable|\BackedEnum|\UnitEnum|array|string $values * @return void */ public function __construct($values) { if ($values instanceof Arrayable) { $values = $values->toArray(); } $this->values = is_array($values) ? $values : func_get_args(); } /** * Convert the rule to a validation string. * * @return string * * @see \Illuminate\Validation\ValidationRuleParser::parseParameters */ public function __toString() { $values = array_map(function ($value) { $value = enum_value($value); return '"'.str_replace('"', '""', $value).'"'; }, $this->values); return $this->rule.':'.implode(',', $values); } }
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings