Skip to content

Commit 6c0514e

Browse files
committed
Fix typos in documentation.
Updated the documentation and fixed some typos in it.
1 parent bfb4c23 commit 6c0514e

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ As your web application grows, you may find yourself in need of more robust file
5151
}
5252
```
5353

54-
Next, change the storage setting in config/stapler.php from 'filesystem' to 's3' (keep in mind, this can be done per attachment if you want to use s3 for a specific attachment only). As of Stapler 1.0.0, S3 storage configration for the S3Client is broken down into two arrays:
54+
Next, change the storage setting in config/stapler.php from 'filesystem' to 's3' (keep in mind, this can be done per attachment if you want to use s3 for a specific attachment only). As of Stapler 1.0.0, S3 storage configuration for the S3Client is broken down into two arrays:
5555

5656
* **s3_client_config**: An array of key/value pairs that will be passed directly into the S3Client::factory() method. You can go [here](http://docs.aws.amazon.com/aws-sdk-php/guide/latest/configuration.html#client-configuration-options) for a complete list/explanation of these options.
5757
* **s3_object_config**: An array of key/value pairs that will be passed directly to the S3Client::putObject() method. You can go [here](http://docs.aws.amazon.com/aws-sdk-php/latest/class-Aws.S3.S3Client.html#_putObject) for a complete list/explanation of these options.

docs/examples.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Class Photo extends Eloquent
116116
```
117117

118118
#### Saving-Files
119-
Once an attachment is defined on a model, we can then assign values to it (as a property on the model) in order to save it as a file upload. Assuming we had an instance of our Photo model from above, we can assign a value to any of our defined attachments before saving the model. Upon successful save of the record, Stapler will go in and handle all of the file uploading, image processing, etc for us. In a controller somewhere, let's assume that we've fetched (or created) a photo model instance and we want to assign some file values to it (from a previously submitted form):
119+
Once an attachment is defined on a model, we can then assign values to it (as a property on the model) in order to save it as a file upload. Assuming we had an instance of our Photo model from above, we can assign a value to any of our defined attachments before saving the model. Upon a successful save of the record, Stapler will go in and handle all of the file uploading, image processing, etc for us. In a controller somewhere, let's assume that we've fetched (or created) a photo model instance and we want to assign some file values to it (from a previously submitted form):
120120

121121
```php
122122
// If we're using Laravel, we can assign the Symfony uploaded file object directly on the modeal:

docs/imageprocessing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
## Image-Processing
22
Stapler makes use of the [imagine image](https://packagist.org/packages/imagine/imagine) library for all image processing. Out of the box, the following image processing patterns/directives will be recognized when defining Stapler styles:
33

4-
* **width**: A style that defines a width only (landscape). Height will be automagically selected to preserve aspect ratio. This works well for resizing
5-
images for display on mobile devices, etc.
4+
* **width**: A style that defines a width only (landscape). Height will be automagically selected to preserve aspect ratio. This works well for resizing images for display on mobile devices, etc.
65
* **xheight**: A style that defines a heigh only (portrait). Width automagically selected to preserve aspect ratio.
76
* **widthxheight#**: Resize then crop.
87
* **widthxheight!**: Resize by exacty width and height. Width and height emphatically given, original aspect ratio will be ignored.
@@ -56,7 +55,7 @@ Of course we can combine these options:
5655
]
5756
```
5857

59-
For even more customized image processing you may also pass a [callable](http://php.net/manual/en/language.types.callable.php) type as the value for a given style definition. Stapler will automatically inject in the uploaded file object instance as well as the Imagine\Image\ImagineInterface object instance for you to work with. When you're done with your processing, simply return an instance of Imagine\Image\ImageInterface from the callable. Using a callable for a style definition provides an incredibly amount of flexibilty when it comes to image processing. As an example of this, let's create a watermarked image using a closure (we'll do a smidge of image processing with Imagine):
58+
For even more customized image processing you may also pass a [callable](http://php.net/manual/en/language.types.callable.php) type as the value for a given style definition. Stapler will automatically inject in the uploaded file object instance as well as the Imagine\Image\ImagineInterface object instance for you to work with. When you're done with your processing, simply return an instance of Imagine\Image\ImageInterface from the callable. Using a callable for a style definition provides an incredible amount of flexibilty when it comes to image processing. As an example of this, let's create a watermarked image using a closure (we'll do a smidge of image processing with Imagine):
6059

6160
````php
6261
'styles' => [

docs/interpolations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Interpolations
2-
With Stapler, uploaded files are accessed by configuring/defining path, url, and default_url strings which point to you uploaded file assets. This is done via string interpolations. Currently, the following interpolations are available for use:
2+
With Stapler, uploaded files are accessed by configuring/defining path, url, and default_url strings which point to your uploaded file assets. This is done via string interpolations. Currently, the following interpolations are available for use:
33

44
* **:attachment** - The name of the file attachment as declared in the hasAttachedFile function, e.g 'avatar'.
5-
* **:class** - The classname of the model contaning the file attachment, e.g User. Stapler can handle namespacing of classes.
5+
* **:class** - The classname of the model containing the file attachment, e.g User. Stapler can handle namespacing of classes.
66
* **:extension** - The file extension type of the uploaded file, e.g '.jpg'
77
* **:filename** - The name of the uploaded file, e.g 'some_file.jpg'
88
* **:id** - The id of the corresponding database record for the uploaded file.
99
* **:id_partition** - The partitioned id of the corresponding database record for the uploaded file, e.g an id = 1 is interpolated as 000/000/001. This is the default and recommended setting for Stapler. Partioned id's help overcome the 32k subfolder problem that occurs in nix-based systems using the EXT3 file system.
1010
* **:hash** - An sha256 hash of the corresponding database record id.
1111
* **:app_root** - The path to the root of the project.
12-
* **:style** - The resizing style of the file (images only), e.g 'thumbnail' or 'orginal'.
12+
* **:style** - The resizing style of the file (images only), e.g 'thumbnail' or 'original'.
1313
* **:url** - The url string pointing to your uploaded file. This interpolation is actually an interpolation itself. It can be composed of any of the above interpolations (except itself).

0 commit comments

Comments
 (0)