protected function validateTypes(Dictionary $types, $path = "")
    {
        $spath = empty($path) ? "" : $path . ".";
        foreach ($types as $key => $value)
        {
            $kpath = $spath . $key;
            if ($value instanceof Dictionary)
            {
                $this->validateTypes($value, $kpath);
            }
            elseif (is_string($value))
            {
                $types[$key] = new Validator($value);
            }
            elseif (!($value instanceof Validator))
            {
                throw new \InvalidArgumentException(
                    "Unknown type: " . Functions::str($value) . " for " . $kpath
                );
            }
        }
    }
protected function validateTypes(Dictionary $types, $path = "")
    {
        $spath = empty($path) ? "" : $path . ".";
        foreach ($types as $key => $value)
        {
            $kpath = $spath . $key;
            if ($value instanceof Dictionary)
            {
                $this->validateTypes($value, $kpath);
            }
            elseif (is_string($value))
            {
                $types[$key] = new Validator($value);
            }
            elseif (!($value instanceof Validator))
            {
                throw new \InvalidArgumentException(
                    "Unknown type: " . Functions::str($value) . " for " . $kpath
                );
            }
        }
    }
protected function validateTypes ( Dictionary $ types , $ path = "" ) { $ spath = empty ( $ path ) ? "" : $ path . "." ; foreach ( $ types as $ key => $ value ) { $ kpath = $ spath . $ key ; if ( $ value instanceof Dictionary ) { $ this -> validateTypes ( $ value , $ kpath ) ; } elseif ( is_string ( $ value ) ) { $ types [ $ key ] = new Validator ( $ value ) ; } elseif ( ! ( $ value instanceof Validator ) ) { throw new \ InvalidArgumentException ( "Unknown type: " . Functions :: str ( $ value ) . " for " . $ kpath ) ; } } }
Validate that all provided types are actually type validators
@param Dictionary $types The supplied type validators
@param string $path The key path, used for reporting errors
Validate that all provided types are actually type validators