src/Funstaff/Tika/Wrapper.php
public function execute()
    {
        $base = $this->generateCommand();
        foreach ($this->document as $name => $doc) {
            /* @var $doc Document */
            if ($doc->getPassword()) {
                $command = sprintf(
                            '%s --password=%s',
                            $base,
                            $doc->getPassword()
                );
            } else {
                $command = $base;
            }
            $command = sprintf('%s %s', $command, escapeshellarg($doc->getPath()));
            if ($this->logger) {
                $this->logger->addInfo(sprintf(
                'Tika command: "%s"',
                $command
                ));
            }

            $process = new Process($command);
            $process->run();

            if (!$process->isSuccessful()) {
                throw new \InvalidArgumentException($process->getErrorOutput());
            }

            $content = $process->getIncrementalOutput();

            $doc->setRawContent($content);
            if ($this->config->getMetadataOnly()) {
                $this->loadMetadata($doc, $content);
            } else {
                if (in_array($this->config->getOutputFormat(), array('xml', 'html'))) {
                    $this->loadDocument($doc, $content);
                } else {
                    $doc->setContent($content);
                }
            }
        }

        return $this;
    }
public function execute()
    {
        $base = $this->generateCommand();
        foreach ($this->document as $name => $doc) {
            /* @var $doc Document */
            if ($doc->getPassword()) {
                $command = sprintf(
                            '%s --password=%s',
                            $base,
                            $doc->getPassword()
                );
            } else {
                $command = $base;
            }
            $command = sprintf('%s %s', $command, escapeshellarg($doc->getPath()));
            if ($this->logger) {
                $this->logger->addInfo(sprintf(
                'Tika command: "%s"',
                $command
                ));
            }

            $process = new Process($command);
            $process->run();

            if (!$process->isSuccessful()) {
                throw new \InvalidArgumentException($process->getErrorOutput());
            }

            $content = $process->getIncrementalOutput();

            $doc->setRawContent($content);
            if ($this->config->getMetadataOnly()) {
                $this->loadMetadata($doc, $content);
            } else {
                if (in_array($this->config->getOutputFormat(), array('xml', 'html'))) {
                    $this->loadDocument($doc, $content);
                } else {
                    $doc->setContent($content);
                }
            }
        }

        return $this;
    }
Execute

@return Wrapper