private function formatJsonData(array $data, $format)
    {
        if (self::JSON_DEFINITION_FORMAT === $format || self::JSON_CONCISE_FORMAT === $format) {
            unset($data['state'], $data['created'], $data['modified'], $data['revision']);
        }

        if (self::JSON_INFO_FORMAT === $format || self::JSON_CONCISE_FORMAT === $format) {
            unset($data['accept'], $data['label'], $data['minentry'], $data['maxentry']);
        }

        if (self::JSON_DEFINITION_FORMAT === $format || self::JSON_INFO_FORMAT === $format) {
            unset($data['elements'], $data['extra']);
        }

        if (self::JSON_DEFINITION_FORMAT === $format) {
            unset($data['uid']);
        } elseif (self::JSON_INFO_FORMAT === $format) {
            unset($data['parameters']);
        }

        return $data;
    }
private function formatJsonData(array $data, $format)
    {
        if (self::JSON_DEFINITION_FORMAT === $format || self::JSON_CONCISE_FORMAT === $format) {
            unset($data['state'], $data['created'], $data['modified'], $data['revision']);
        }

        if (self::JSON_INFO_FORMAT === $format || self::JSON_CONCISE_FORMAT === $format) {
            unset($data['accept'], $data['label'], $data['minentry'], $data['maxentry']);
        }

        if (self::JSON_DEFINITION_FORMAT === $format || self::JSON_INFO_FORMAT === $format) {
            unset($data['elements'], $data['extra']);
        }

        if (self::JSON_DEFINITION_FORMAT === $format) {
            unset($data['uid']);
        } elseif (self::JSON_INFO_FORMAT === $format) {
            unset($data['parameters']);
        }

        return $data;
    }
private function formatJsonData ( array $ data , $ format ) { if ( self :: JSON_DEFINITION_FORMAT === $ format || self :: JSON_CONCISE_FORMAT === $ format ) { unset ( $ data [ 'state' ] , $ data [ 'created' ] , $ data [ 'modified' ] , $ data [ 'revision' ] ) ; } if ( self :: JSON_INFO_FORMAT === $ format || self :: JSON_CONCISE_FORMAT === $ format ) { unset ( $ data [ 'accept' ] , $ data [ 'label' ] , $ data [ 'minentry' ] , $ data [ 'maxentry' ] ) ; } if ( self :: JSON_DEFINITION_FORMAT === $ format || self :: JSON_INFO_FORMAT === $ format ) { unset ( $ data [ 'elements' ] , $ data [ 'extra' ] ) ; } if ( self :: JSON_DEFINITION_FORMAT === $ format ) { unset ( $ data [ 'uid' ] ) ; } elseif ( self :: JSON_INFO_FORMAT === $ format ) { unset ( $ data [ 'parameters' ] ) ; } return $ data ; }
This method will lighten provided data into requested format, if format is equal to 0 this method
won't transform anything.

@param array   $data
@param integer $format

@return array
This method will lighten provided data into requested format if format is equal to 0 this method won t transform anything .