src/Writer.php
public function useKeyAsValue($key, $normalize = false)
    {
        if (true !== $normalize && !$this->isValidNodeName($key)) {
            throw new \InvalidArgumentException(sprintf('%s is an invalid node name', $key));
        }

        $this->nodeValueKey = $normalize ? $this->normalizer->normalize($key) : $key;
    }
public function useKeyAsValue($key, $normalize = false)
    {
        if (true !== $normalize && !$this->isValidNodeName($key)) {
            throw new \InvalidArgumentException(sprintf('%s is an invalid node name', $key));
        }

        $this->nodeValueKey = $normalize ? $this->normalizer->normalize($key) : $key;
    }
public function useKeyAsValue ( $ key , $ normalize = false ) { if ( true !== $ normalize && ! $ this -> isValidNodeName ( $ key ) ) { throw new \ InvalidArgumentException ( sprintf ( '%s is an invalid node name' , $ key ) ) ; } $ this -> nodeValueKey = $ normalize ? $ this -> normalizer -> normalize ( $ key ) : $ key ; }
Sets the key that indicates a node value.

@param string $key
@param bool $normalize

@throws \InvalidArgumentException if $key is not null and an invalid nodename.
@return void
Sets the key that indicates a node value .