Has
trait Has (View source)
Methods
countBetween(int|string $min, int|string $max)
Assert that the prop size is between a given minimum and maximum.
missingAll(array|string $key)
Assert that none of the given props exist.
string
dotPath(string $key = '')
Compose the absolute "dot" path to the given key.
void
interactsWith(string $key)
Marks the property as interacted.
mixed
prop(string|null $key = null)
Retrieve a prop within the current scope using "dot" notation.
$this
etc()
Disables the interaction check.
Details
Has
countBetween(int|string $min, int|string $max)
Assert that the prop size is between a given minimum and maximum.
Has
has(string|int $key, int|Closure|null $length = null, Closure|null $callback = null)
Ensure that the given prop exists.
abstract protected string
dotPath(string $key = '')
Compose the absolute "dot" path to the given key.
abstract protected mixed
prop(string|null $key = null)
Retrieve a prop within the current scope using "dot" notation.
abstract protected $this
scope(string $key, Closure $callback)
Instantiate a new "scope" at the path of the given key.