private function parse(array $parameters, array $schema, string $parent_key = null)
    {
        array_map(
            function ($key, $value) use ($schema, $parent_key) {
                // If key found in schema
                if (array_key_exists($key, $schema)) {

                    // If we have two arrays, then run recursive analyze
                    if (is_array($value) && is_array($schema[$key])) {
                        $this->parse($value, $schema[$key], $key);
                    } else {
                        // Make method from variable
                        $method = 'is_' . $schema[$key];

                        try {
                            // Check for exception
                            TypeException::wrongType($method, $key, $value, $schema[$key], $parent_key);
                        } catch (TypeException $e) {
                            !$this->_strict ?: die();
                        }
                    }

                }
            },
            array_keys($parameters),
            $parameters
        );
    }
private function parse(array $parameters, array $schema, string $parent_key = null)
    {
        array_map(
            function ($key, $value) use ($schema, $parent_key) {
                // If key found in schema
                if (array_key_exists($key, $schema)) {

                    // If we have two arrays, then run recursive analyze
                    if (is_array($value) && is_array($schema[$key])) {
                        $this->parse($value, $schema[$key], $key);
                    } else {
                        // Make method from variable
                        $method = 'is_' . $schema[$key];

                        try {
                            // Check for exception
                            TypeException::wrongType($method, $key, $value, $schema[$key], $parent_key);
                        } catch (TypeException $e) {
                            !$this->_strict ?: die();
                        }
                    }

                }
            },
            array_keys($parameters),
            $parameters
        );
    }
private function parse ( array $ parameters , array $ schema , string $ parent_key = null ) { array_map ( function ( $ key , $ value ) use ( $ schema , $ parent_key ) { // If key found in schema if ( array_key_exists ( $ key , $ schema ) ) { // If we have two arrays, then run recursive analyze if ( is_array ( $ value ) && is_array ( $ schema [ $ key ] ) ) { $ this -> parse ( $ value , $ schema [ $ key ] , $ key ) ; } else { // Make method from variable $ method = 'is_' . $ schema [ $ key ] ; try { // Check for exception TypeException :: wrongType ( $ method , $ key , $ value , $ schema [ $ key ] , $ parent_key ) ; } catch ( TypeException $ e ) { ! $ this -> _strict ? : die ( ) ; } } } } , array_keys ( $ parameters ) , $ parameters ) ; }
Compare current parameters with required schema

@param   array $parameters
@param   array $schema
@param   string|null $parent_key
Compare current parameters with required schema