public function setValue($value)
    {
        if (is_numeric($value)) {
            $value = (string) $value;
        }

        if (!is_string($value) && $value !== null) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($value) ? get_class($value) : gettype($value))));
        }

        $this->node->nodeValue = $value;

        return $this;
    }
public function setValue($value)
    {
        if (is_numeric($value)) {
            $value = (string) $value;
        }

        if (!is_string($value) && $value !== null) {
            throw new InvalidArgumentException(sprintf('%s expects parameter 1 to be string, %s given', __METHOD__, (is_object($value) ? get_class($value) : gettype($value))));
        }

        $this->node->nodeValue = $value;

        return $this;
    }
public function setValue ( $ value ) { if ( is_numeric ( $ value ) ) { $ value = ( string ) $ value ; } if ( ! is_string ( $ value ) && $ value !== null ) { throw new InvalidArgumentException ( sprintf ( '%s expects parameter 1 to be string, %s given' , __METHOD__ , ( is_object ( $ value ) ? get_class ( $ value ) : gettype ( $ value ) ) ) ) ; } $ this -> node -> nodeValue = $ value ; return $ this ; }
Set the value of this node.

@param string $value The new value of the node

@return \DiDom\Element

@throws \InvalidArgumentException if value is not string
Set the value of this node .