src/Funstaff/Tika/Wrapper.php
public function getDocument($name = null)
    {
        if ($name) {
            if (!array_key_exists($name, $this->document)) {
                throw new \InvalidArgumentException(sprintf(
                    'The document "%s" does not exist',
                    $name
                ));
            }

            return $this->document[$name];
        } else {
            return $this->document;
        }
    }
public function getDocument($name = null)
    {
        if ($name) {
            if (!array_key_exists($name, $this->document)) {
                throw new \InvalidArgumentException(sprintf(
                    'The document "%s" does not exist',
                    $name
                ));
            }

            return $this->document[$name];
        } else {
            return $this->document;
        }
    }
Get Document

@param string|null $name name of document

@return DocumentInterface or array