public function bindTo(string $valueObjectClass)
    {
        /** @var string|TypedObject $valueObjectClass */
        if (!is_subclass_of($valueObjectClass, IValueObject::class, true)) {
            throw InvalidArgumentException::format(
                'Invalid value object class supplied to %s: expecting subclass of %s, %s given',
                __METHOD__, IValueObject::class, $valueObjectClass
            );
        }

        $this->class = $valueObjectClass::definition();
    }
public function bindTo(string $valueObjectClass)
    {
        /** @var string|TypedObject $valueObjectClass */
        if (!is_subclass_of($valueObjectClass, IValueObject::class, true)) {
            throw InvalidArgumentException::format(
                'Invalid value object class supplied to %s: expecting subclass of %s, %s given',
                __METHOD__, IValueObject::class, $valueObjectClass
            );
        }

        $this->class = $valueObjectClass::definition();
    }
public function bindTo ( string $ valueObjectClass ) { /** @var string|TypedObject $valueObjectClass */ if ( ! is_subclass_of ( $ valueObjectClass , IValueObject :: class , true ) ) { throw InvalidArgumentException :: format ( 'Invalid value object class supplied to %s: expecting subclass of %s, %s given' , __METHOD__ , IValueObject :: class , $ valueObjectClass ) ; } $ this -> class = $ valueObjectClass :: definition ( ) ; }
Defines the value object type.

@param string $valueObjectClass

@throws InvalidArgumentException
Defines the value object type .