S
S
semki0962017-11-06 00:02:28
Slim Framework
semki096, 2017-11-06 00:02:28

How does this ::class() construct work?

How does this design work? I read this manual batpyiiikob.ru/%D0%B0%D0%B2%D1%82%D0%BE%D1%80%D0%B...

use Respect\Validation\Validator as v;
v::with('App\\Validation\\Rules\\');

The first line is clear - use the validation class as v.
The second v:with is a class method. App\\Validation\\Rules\\ - as I understand the namespace. I can't figure out what this piece of code is doing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton October, 2017-11-06
@semki096

The Validator class has a static with method. It takes a string with path '\\' - this is a slash escape, the output is a string with a single \;
based on the name and what the author writes, validation rules are stored along this path

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question