public function setValuePropertyName($valuePropertyName)
    {
        if (!is_string($valuePropertyName) || $valuePropertyName === '') {
            throw new InvalidArgumentException('"Value property name" argument must be a string and must not empty.');
        }

        if (!property_exists($this, $valuePropertyName)) {
            throw new InvalidArgumentException(sprintf('Property "%s" does not exist.', $valuePropertyName));
        }

        $this->valuePropertyName = $valuePropertyName;

        return $this;
    }
public function setValuePropertyName($valuePropertyName)
    {
        if (!is_string($valuePropertyName) || $valuePropertyName === '') {
            throw new InvalidArgumentException('"Value property name" argument must be a string and must not empty.');
        }

        if (!property_exists($this, $valuePropertyName)) {
            throw new InvalidArgumentException(sprintf('Property "%s" does not exist.', $valuePropertyName));
        }

        $this->valuePropertyName = $valuePropertyName;

        return $this;
    }
public function setValuePropertyName ( $ valuePropertyName ) { if ( ! is_string ( $ valuePropertyName ) || $ valuePropertyName === '' ) { throw new InvalidArgumentException ( '"Value property name" argument must be a string and must not empty.' ) ; } if ( ! property_exists ( $ this , $ valuePropertyName ) ) { throw new InvalidArgumentException ( sprintf ( 'Property "%s" does not exist.' , $ valuePropertyName ) ) ; } $ this -> valuePropertyName = $ valuePropertyName ; return $ this ; }
Sets the name of the property which contains the raw value.

@param string $valuePropertyName

@return static
@throws InvalidArgumentException On invalid argument
Sets the name of the property which contains the raw value .