original_string: 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 );
      }
code: 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 );
      }
code_tokens: 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 ) ; }
docstring: Converts an object to an XML string
  
  @param mixed  $object
  @param string $rootName
  @param string $nodeName
  @param bool   $addHeader If true, the <?xml?> header is prepended to the result
  
  @throws \InvalidArgumentException
  @return null|string
docstring_tokens: Converts an object to an XML string