public function setContentFile($file)
    {
        try {
            $content = file_get_contents((string)$file);
        } catch(\Exception $e) {
            $this->logger->error( $e->getMessage() );
        }
        $this->setContent($content);
        return $this;
    }
public function setContentFile($file)
    {
        try {
            $content = file_get_contents((string)$file);
        } catch(\Exception $e) {
            $this->logger->error( $e->getMessage() );
        }
        $this->setContent($content);
        return $this;
    }
public function setContentFile ( $ file ) { try { $ content = file_get_contents ( ( string ) $ file ) ; } catch ( \ Exception $ e ) { $ this -> logger -> error ( $ e -> getMessage ( ) ) ; } $ this -> setContent ( $ content ) ; return $ this ; }
Set the document content from the file system.

@param string $file The file location.
@return Document $this
Set the document content from the file system .