public static function fromObject( $object, $rootName = null, $nodeName = null, $addHeader = true )
    {
        if ( !is_object( $object ) )
        {
            throw new \InvalidArgumentException( 'The value of "$object" is not an object.' );
        }

        return static::fromArray( get_object_vars( $object ), $rootName, $nodeName, $addHeader );
    }