public function get($object)
    {
        // search for the correct serializer
        if (is_string($object)) {
            if ($meta = $this->om->getClassMetaData($object)) {
                $object = $meta->name;
            }
        }

        foreach ($this->serializers as $serializer) {
            $className = $this->getSerializerHandledClass($serializer);

            if ($object instanceof $className || $object === $className) {
                return $serializer;
            }
        }

        $className = is_object($object) ? get_class($object) : $object;

        throw new \Exception(
            sprintf('No serializer found for class "%s" Maybe you forgot to add the "claroline.serializer" tag to your serializer.', is_string($object) ? $object : get_class($object))
        );
    }
public function get($object)
    {
        // search for the correct serializer
        if (is_string($object)) {
            if ($meta = $this->om->getClassMetaData($object)) {
                $object = $meta->name;
            }
        }

        foreach ($this->serializers as $serializer) {
            $className = $this->getSerializerHandledClass($serializer);

            if ($object instanceof $className || $object === $className) {
                return $serializer;
            }
        }

        $className = is_object($object) ? get_class($object) : $object;

        throw new \Exception(
            sprintf('No serializer found for class "%s" Maybe you forgot to add the "claroline.serializer" tag to your serializer.', is_string($object) ? $object : get_class($object))
        );
    }
public function get ( $ object ) { // search for the correct serializer if ( is_string ( $ object ) ) { if ( $ meta = $ this -> om -> getClassMetaData ( $ object ) ) { $ object = $ meta -> name ; } } foreach ( $ this -> serializers as $ serializer ) { $ className = $ this -> getSerializerHandledClass ( $ serializer ) ; if ( $ object instanceof $ className || $ object === $ className ) { return $ serializer ; } } $ className = is_object ( $ object ) ? get_class ( $ object ) : $ object ; throw new \ Exception ( sprintf ( 'No serializer found for class "%s" Maybe you forgot to add the "claroline.serializer" tag to your serializer.' , is_string ( $ object ) ? $ object : get_class ( $ object ) ) ) ; }
Gets a registered serializer instance.

@param mixed $object

@return mixed

@throws \Exception
Gets a registered serializer instance .