public function setSerializer($serializer)
    {
        if (!$serializer instanceof AnDomainSerializerAbstract) {
            if (is_string($serializer) && strpos($serializer, '.') === false) {
                $identifier = clone $this->_repository->getIdentifier();
                $identifier->path = array('domain','serializer');
                $identifier->name = $serializer;
                register_default(array(
                    'identifier' => $identifier, 
                    'prefix' => $this->_repository->getClone()
                ));
            } else {
                $identifier = $this->getIdentifier($serializer);
            }

            $serializer = $identifier;
        }

        $this->_serializer = $serializer;
    }
public function setSerializer($serializer)
    {
        if (!$serializer instanceof AnDomainSerializerAbstract) {
            if (is_string($serializer) && strpos($serializer, '.') === false) {
                $identifier = clone $this->_repository->getIdentifier();
                $identifier->path = array('domain','serializer');
                $identifier->name = $serializer;
                register_default(array(
                    'identifier' => $identifier, 
                    'prefix' => $this->_repository->getClone()
                ));
            } else {
                $identifier = $this->getIdentifier($serializer);
            }

            $serializer = $identifier;
        }

        $this->_serializer = $serializer;
    }
public function setSerializer ( $ serializer ) { if ( ! $ serializer instanceof AnDomainSerializerAbstract ) { if ( is_string ( $ serializer ) && strpos ( $ serializer , '.' ) === false ) { $ identifier = clone $ this -> _repository -> getIdentifier ( ) ; $ identifier -> path = array ( 'domain' , 'serializer' ) ; $ identifier -> name = $ serializer ; register_default ( array ( 'identifier' => $ identifier , 'prefix' => $ this -> _repository -> getClone ( ) ) ) ; } else { $ identifier = $ this -> getIdentifier ( $ serializer ) ; } $ serializer = $ identifier ; } $ this -> _serializer = $ serializer ; }
Set the serializer.

@param AnDomainSerializerAbstract|string $serializer
Set the serializer .