protected function checkMissingData($providedProperties, ReflectionClass $rc)
    {
        foreach ($rc->getProperties() as $property) {
            $rprop = $rc->getProperty($property->name);
            $docblock = $rprop->getDocComment();
            $annotations = $this->parseAnnotations($docblock);
            if (isset($annotations['required'])
                && !isset($providedProperties[$property->name])
            ) {
                throw new JsonMapper_Exception(
                    'Required property "' . $property->name . '" of class '
                    . $rc->getName()
                    . ' is missing in JSON data'
                );
            }
        }
    }
protected function checkMissingData($providedProperties, ReflectionClass $rc)
    {
        foreach ($rc->getProperties() as $property) {
            $rprop = $rc->getProperty($property->name);
            $docblock = $rprop->getDocComment();
            $annotations = $this->parseAnnotations($docblock);
            if (isset($annotations['required'])
                && !isset($providedProperties[$property->name])
            ) {
                throw new JsonMapper_Exception(
                    'Required property "' . $property->name . '" of class '
                    . $rc->getName()
                    . ' is missing in JSON data'
                );
            }
        }
    }
protected function checkMissingData ( $ providedProperties , ReflectionClass $ rc ) { foreach ( $ rc -> getProperties ( ) as $ property ) { $ rprop = $ rc -> getProperty ( $ property -> name ) ; $ docblock = $ rprop -> getDocComment ( ) ; $ annotations = $ this -> parseAnnotations ( $ docblock ) ; if ( isset ( $ annotations [ 'required' ] ) && ! isset ( $ providedProperties [ $ property -> name ] ) ) { throw new JsonMapper_Exception ( 'Required property "' . $ property -> name . '" of class ' . $ rc -> getName ( ) . ' is missing in JSON data' ) ; } } }
Check required properties exist in json

@param array  $providedProperties array with json properties
@param object $rc                 Reflection class to check

@throws JsonMapper_Exception

@return void
Check required properties exist in json