src/Validator.php
public function makeSubSchemaValidator($data, $schema, $dataPath = null, $schemaPath = null)
    {
        $validator = new Validator($data, $schema, $this->ruleSet);

        $validator->dataPath         = $dataPath ?: $this->dataPath;
        $validator->baseSchemaPath   = $schemaPath ?: $this->getSchemaPath();
        $validator->maxDepth         = $this->maxDepth;
        $validator->depth            = $this->depth + 1;

        return $validator;
    }
public function makeSubSchemaValidator($data, $schema, $dataPath = null, $schemaPath = null)
    {
        $validator = new Validator($data, $schema, $this->ruleSet);

        $validator->dataPath         = $dataPath ?: $this->dataPath;
        $validator->baseSchemaPath   = $schemaPath ?: $this->getSchemaPath();
        $validator->maxDepth         = $this->maxDepth;
        $validator->depth            = $this->depth + 1;

        return $validator;
    }
public function makeSubSchemaValidator ( $ data , $ schema , $ dataPath = null , $ schemaPath = null ) { $ validator = new Validator ( $ data , $ schema , $ this -> ruleSet ) ; $ validator -> dataPath = $ dataPath ? : $ this -> dataPath ; $ validator -> baseSchemaPath = $ schemaPath ? : $ this -> getSchemaPath ( ) ; $ validator -> maxDepth = $ this -> maxDepth ; $ validator -> depth = $ this -> depth + 1 ; return $ validator ; }
Create a new sub-validator.

@param mixed       $data
@param object      $schema
@param string|null $dataPath
@param string|null $schemaPath

@return Validator
Create a new sub - validator .