Factory/SerializerFactory.php
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;
    }
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;
    }
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 ; }
Generate new Serializer

@return SerializerInterface Generated Serializer
Generate new Serializer