2017 © Pedro Peláez
 

library word-service-provider

A wrapper for PHPWord usage in Silex 2 projects

image

denisristic/word-service-provider

A wrapper for PHPWord usage in Silex 2 projects

  • Wednesday, September 21, 2016
  • by denisristic
  • Repository
  • 1 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Silex WordServiceProvider

Introduction

This service provider for Silex allows you to quickly generate Word (*.doc) documents. Either pass in a query result set, and a list of headers, or use the Doctrine functionality to convert a html to a document., (*1)

Installation

Require the provider using composer:, (*2)

    composer require denisristic/word-service-provider

Register the provider in your application somewhere:, (*3)

    $app->register(new \denisristic\WordServiceProvider\Provider\WordServiceProvider());

Usage

Generate a document from HTML:, (*4)

        $word = $app['word']->generateDOC('<h1>Test HTML header</h1>');

Forcing a download of the spreadsheet:, (*5)

        $controllers->get('/download', function () use($app) {

            $word = $app['word']->generateDOC('<h1>Test HTML header</h1>');

            $docName = 'entries-' . date('Y-m-dhis') . '.doc';
            $response = new Response($word);
            $response->headers->add(array(
                'Content-Type' => 'application/vns.ms-word'
                ,'Content-Disposition' => 'inline; filename="' . $docName . '"'
                ,'Pragma' => 'no-cache'
                ,'Expired' => 0
            ));
            return $response;

        })->bind('download');

The Versions

21/09 2016

dev-master

9999999-dev https://github.com/denisristic/word-service-provider

A wrapper for PHPWord usage in Silex 2 projects

  Sources   Download

MIT

The Requires

 

php silex symfony word doc phpword

21/09 2016

0.1.1

0.1.1.0 https://github.com/denisristic/word-service-provider

A wrapper for PHPWord usage in Silex 2 projects

  Sources   Download

MIT

The Requires

 

php silex symfony word doc phpword

13/07 2016

0.1

0.1.0.0 https://github.com/denisristic/word-service-provider

A wrapper for PHPWord usage in Silex 2 projects

  Sources   Download

MIT

The Requires

 

php silex symfony word doc phpword