public function validate($entity, $entityName = null)
    {
        $entityName = $entityName ?: 'root';

        // Validate root type
        $this->validateType($entity, $this->schema, $entityName);

        return $this;
    }
public function validate($entity, $entityName = null)
    {
        $entityName = $entityName ?: 'root';

        // Validate root type
        $this->validateType($entity, $this->schema, $entityName);

        return $this;
    }
public function validate ( $ entity , $ entityName = null ) { $ entityName = $ entityName ? : 'root' ; // Validate root type $ this -> validateType ( $ entity , $ this -> schema , $ entityName ) ; return $ this ; }
Validate schema object

@param mixed $entity
@param string $entityName

@return Validator
Validate schema object