Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

improved docs

  • Loading branch information...
commit daa1802ecbb3dbe4f186c3007cf05be9249a6794 1 parent 852bd44
@kaviththiranga authored
Showing with 16 additions and 3 deletions.
  1. +16 −3 docs/manual/en-US/chapters/packages/media.md
View
19 docs/manual/en-US/chapters/packages/media.md
@@ -6,12 +6,26 @@ The *Media* package is designed to compile and compress assets such as `Javascri
### Abstract Classes
+#### JMediaCompressor
+
+Abstract class `JMediaCompressor` contains functions to compress contents of a file by removing comment blocks, unnecessary white space etc. It is extended by concrete classes such as `JMediaCompressorCss` and
+`JMediaCompressorJs` which contains implementation of compress function for a particular file type.
+
+##### *Example* : How to obtain a `JMediaCompressorJs` object for javascript files.
+
+```php
+ // Options
+ $options = array('type' => 'css', 'REMOVE_COMMENTS' => true);
+
+ $collection = JMediaCollection::getInstance($options);
+```
+
#### JMediaCollection
Abstract class `JMediaCollection` contains functions to combine several files into a single file. It is extended by concrete classes such as `JMediaCollectionCss` and
-`JMediaCollectionJs` which contains implementations of combine functions for a particular file type.
+`JMediaCollectionJs` which contains implementation of combine function for a particular file type.
-Example : How to obtain a `JMediaCollectionCss` object for css files.
+##### *Example* : How to obtain a `JMediaCollectionCss` object for css files.
```php
// Options
@@ -19,4 +33,3 @@ Example : How to obtain a `JMediaCollectionCss` object for css files.
$collection = JMediaCollection::getInstance($options);
```
-
Please sign in to comment.
Something went wrong with that request. Please try again.