public function serializeObjectToId(VisitorInterface $visitor, $data, array $type, Context $context)
    {
        $className = $this->manager->getClass();

        if ($data instanceof $className) {
            return $visitor->visitInteger($data->getId(), $type, $context);
        }
    }
public function serializeObjectToId(VisitorInterface $visitor, $data, array $type, Context $context)
    {
        $className = $this->manager->getClass();

        if ($data instanceof $className) {
            return $visitor->visitInteger($data->getId(), $type, $context);
        }
    }
public function serializeObjectToId ( VisitorInterface $ visitor , $ data , array $ type , Context $ context ) { $ className = $ this -> manager -> getClass ( ) ; if ( $ data instanceof $ className ) { return $ visitor -> visitInteger ( $ data -> getId ( ) , $ type , $ context ) ; } }
Serialize data object to id.

@param object $data

@return int|null
Serialize data object to id .