src/Serializer.php
private function doDeserialize(\stdClass $c, $class)
    {
        $annotation = new $class([]);
        foreach ($c as $property => $value) {
            if ($property === '$ref') {
                $property = 'ref';
            }

            if (substr($property, 0, 2) === 'x-') {
                if ($annotation->x === UNDEFINED) {
                    $annotation->x = [];
                }
                $custom = substr($property, 2);
                $annotation->x[$custom] = $value;
            } else {
                $annotation->$property = $this->doDeserializeProperty($annotation, $property, $value);
            }
        }
        return $annotation;
    }
private function doDeserialize(\stdClass $c, $class)
    {
        $annotation = new $class([]);
        foreach ($c as $property => $value) {
            if ($property === '$ref') {
                $property = 'ref';
            }

            if (substr($property, 0, 2) === 'x-') {
                if ($annotation->x === UNDEFINED) {
                    $annotation->x = [];
                }
                $custom = substr($property, 2);
                $annotation->x[$custom] = $value;
            } else {
                $annotation->$property = $this->doDeserializeProperty($annotation, $property, $value);
            }
        }
        return $annotation;
    }
private function doDeserialize ( \ stdClass $ c , $ class ) { $ annotation = new $ class ( [ ] ) ; foreach ( $ c as $ property => $ value ) { if ( $ property === '$ref' ) { $ property = 'ref' ; } if ( substr ( $ property , 0 , 2 ) === 'x-' ) { if ( $ annotation -> x === UNDEFINED ) { $ annotation -> x = [ ] ; } $ custom = substr ( $ property , 2 ) ; $ annotation -> x [ $ custom ] = $ value ; } else { $ annotation -> $ property = $ this -> doDeserializeProperty ( $ annotation , $ property , $ value ) ; } } return $ annotation ; }
Do deserialization.

@param \stdClass $c
@param string    $class The class name of annotation.

@return Annotations\AbstractAnnotation
Do deserialization .