Skip to content

Commit

Permalink
Amend the Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Finesse committed Jun 4, 2016
1 parent 6fb9187 commit f73b320
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,10 @@ We speak:
You are welcome to submit issues in any of this languages.

Comments in the code should be written in English.

## Principles

Please follow ImageTools principles:

* `Image` object is immutable.
* In case of error methods should always throw exceptions, not errors or warnings.
13 changes: 9 additions & 4 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ $thumbsFiles = array_map( function( $size ) use ( $image, $watermark )

## Reference

None of methods trigger errors or warnings. Instead of that they throw exceptions. If some of them triggers error please
[report us](https://github.com/AigerTeam/ImageTools/issues/new).

### Creating Image object

An `Image` object can be created by various ways.

#### 1. Using one of the `ImageFactory` object method
#### 1. Using one of the ImageFactory object method

```php
use AigerTeam\ImageTools\ImageFactory;
Expand All @@ -92,9 +95,10 @@ $factory = new ImageFactory();
$image = $factory->blank( 100, 150 );
```

See PHPDoc in the `ImageFactory` class code to get the list of all image creating methods.
See PHPDoc in the `ImageFactory` [class code](https://github.com/AigerTeam/ImageTools/blob/master/src/ImageFactory.php)
for more details and the list of all image creating methods.

#### 2. Passing DG image resource to the `Image` constructor
#### 2. Passing DG image resource to the Image constructor

```php
use AigerTeam\ImageTools\Image;
Expand Down Expand Up @@ -130,7 +134,8 @@ $image
->toFile( 'image.jpg' );
```

See PHPDoc in the `Image` class code to get the list of all methods.
See PHPDoc in the `Image` [class code](https://github.com/AigerTeam/ImageTools/blob/master/src/Image.php) for more
details and the list of all methods.


## Version compatibility
Expand Down

0 comments on commit f73b320

Please sign in to comment.