public function registerValueObject($valueObject, $valueMap = null)
    {
        if (!is_string($valueObject)) {
            $valueObject = get_class($valueObject);
        }

        if ($valueMap === null) {

            // First, we'll look into registered namespaces for Entity Maps,
            // if any. Then we'll fallback to the same namespace of the object
            if (!$valueMap = $this->getMapFromNamespaces($valueObject)) {
                $valueMap = $valueObject.'Map';
            } else {
                $valueMap = get_class($valueMap);
            }
        }

        if (!class_exists($valueMap)) {
            throw new MappingException("$valueMap doesn't exists");
        }

        $this->valueClasses[$valueObject] = $valueMap;
    }
public function registerValueObject($valueObject, $valueMap = null)
    {
        if (!is_string($valueObject)) {
            $valueObject = get_class($valueObject);
        }

        if ($valueMap === null) {

            // First, we'll look into registered namespaces for Entity Maps,
            // if any. Then we'll fallback to the same namespace of the object
            if (!$valueMap = $this->getMapFromNamespaces($valueObject)) {
                $valueMap = $valueObject.'Map';
            } else {
                $valueMap = get_class($valueMap);
            }
        }

        if (!class_exists($valueMap)) {
            throw new MappingException("$valueMap doesn't exists");
        }

        $this->valueClasses[$valueObject] = $valueMap;
    }
public function registerValueObject ( $ valueObject , $ valueMap = null ) { if ( ! is_string ( $ valueObject ) ) { $ valueObject = get_class ( $ valueObject ) ; } if ( $ valueMap === null ) { // First, we'll look into registered namespaces for Entity Maps, // if any. Then we'll fallback to the same namespace of the object if ( ! $ valueMap = $ this -> getMapFromNamespaces ( $ valueObject ) ) { $ valueMap = $ valueObject . 'Map' ; } else { $ valueMap = get_class ( $ valueMap ) ; } } if ( ! class_exists ( $ valueMap ) ) { throw new MappingException ( "$valueMap doesn't exists" ) ; } $ this -> valueClasses [ $ valueObject ] = $ valueMap ; }
Register a Value Object.

@param string $valueObject
@param string $valueMap

@throws MappingException

@return void
Register a Value Object .