Skip to content

Commit

Permalink
improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kaviththiranga committed Dec 15, 2012
1 parent 852bd44 commit daa1802
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions docs/manual/en-US/chapters/packages/media.md
Expand Up @@ -6,17 +6,30 @@ 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
$options = array('type' => 'css', 'FILE_COMMENTS' => true);

$collection = JMediaCollection::getInstance($options);
```

0 comments on commit daa1802

Please sign in to comment.