protected function validateInput($input)
    {
        // check
        $keys = [
            'form',
            'elements',
        ];

        switch (gettype($input)) {
            case 'array':
                foreach ($keys as $key) {
                    if (array_key_exists($key, $input) === false) {
                        throw new \Exception(
                            'Input invalid! Please make sure that input array contains keys (form, elements).'
                        );
                    }
                }
                break;
        }

        return true;
    }
protected function validateInput($input)
    {
        // check
        $keys = [
            'form',
            'elements',
        ];

        switch (gettype($input)) {
            case 'array':
                foreach ($keys as $key) {
                    if (array_key_exists($key, $input) === false) {
                        throw new \Exception(
                            'Input invalid! Please make sure that input array contains keys (form, elements).'
                        );
                    }
                }
                break;
        }

        return true;
    }
protected function validateInput ( $ input ) { // check $ keys = [ 'form' , 'elements' , ] ; switch ( gettype ( $ input ) ) { case 'array' : foreach ( $ keys as $ key ) { if ( array_key_exists ( $ key , $ input ) === false ) { throw new \ Exception ( 'Input invalid! Please make sure that input array contains keys (form, elements).' ) ; } } break ; } return true ; }
Validates the input passed to parser.

@param array $input The input to validation

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if valid, otherwise FALSE

@throws \Exception
Validates the input passed to parser .