Skip to content

Commit

Permalink
Added backward compatibility for deprecated alignment options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Syroeshko committed Nov 14, 2015
1 parent 015a34f commit f884527
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
19 changes: 7 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,20 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your
PHPWord requires the following:

- PHP 5.3+
- [Zip extension](http://php.net/manual/en/book.zip.php)
- [XML Parser extension](http://www.php.net/manual/en/xml.installation.php)
- [Zend\Validator component](http://framework.zend.com/manual/current/en/modules/zend.validator.html)
- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write DOCX and ODT)
- [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images)
- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write DOCX and ODT)
- [XSL extension](http://php.net/manual/en/book.xsl.php) (optional, used to apply XSL style sheet to template )
- [dompdf](https://github.com/dompdf/dompdf) (optional, used to write PDF)

## Installation

It is recommended that you install the PHPWord library [through composer](http://getcomposer.org/). To do so, add
the following lines to your ``composer.json``.
PHPWord is installed via [Composer](https://getcomposer.org/).
You just need to [add dependency](https://getcomposer.org/doc/04-schema.md#package-links>) on PHPWord into your package.

Example:

```json
{
Expand All @@ -73,21 +76,13 @@ the following lines to your ``composer.json``.
}
```

Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPWord/releases).
In this case, you will have to register the autoloader.

```php
require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
\PhpOffice\PhpWord\Autoloader::register();
```

## Getting started

The following is a basic usage example of the PHPWord library.

```php
<?php
require_once 'src/PhpWord/Autoloader.php';
require_once 'bootstrap.php';
\PhpOffice\PhpWord\Autoloader::register();

// Creating the new document...
Expand Down
2 changes: 1 addition & 1 deletion docs/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ folder <https://github.com/PHPOffice/PHPWord/tree/master/samples/>`__.
.. code-block:: php
<?php
require_once 'src/PhpWord/Autoloader.php';
require_once 'bootstrap.php';
\PhpOffice\PhpWord\Autoloader::register();
// Creating the new document...
Expand Down
2 changes: 2 additions & 0 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ PHPWord is installed via `Composer <https://getcomposer.org/>`__.
You just need to `add dependency <https://getcomposer.org/doc/04-schema.md#package-links>`__ on PHPWord into your package.

Example:

.. code-block:: json
{
Expand All @@ -37,6 +38,7 @@ If you are a developer or if you want to help us with testing then fetch the lat
Notice: all contributions must be done against the developer branch.

Example:

.. code-block:: json
{
Expand Down

0 comments on commit f884527

Please sign in to comment.