public function get()
{
if (class_exists($this->serializerType)) {
if (in_array('Mmoreram\\RSQueueBundle\\Serializer\\Interfaces\\SerializerInterface', class_implements($this->serializerType))) {
return new $this->serializerType();
} else {
throw new SerializerNotImplementsInterfaceException();
}
}
$composedSerializerNamespace = '\\Mmoreram\\RSQueueBundle\\Serializer\\' . $this->serializerType . 'Serializer';
if (class_exists($composedSerializerNamespace)) {
return new $composedSerializerNamespace();
}
throw new SerializerNotFoundException();
}