PHPackages                             knplabs/knp-media-exposer-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. knplabs/knp-media-exposer-bundle

AbandonedArchivedSymfony-bundle[Utility &amp; Helpers](/categories/utility)

knplabs/knp-media-exposer-bundle
================================

Allows to easily use the media exposer library in a Symfony project

82.2k2PHP

Since Apr 24Pushed 5y ago26 watchersCompare

[ Source](https://github.com/KnpLabs/KnpMediaExposerBundle)[ Packagist](https://packagist.org/packages/knplabs/knp-media-exposer-bundle)[ RSS](/packages/knplabs-knp-media-exposer-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

KnpMediaExposerBundle
=====================

[](#knpmediaexposerbundle)

The KnpMediaExposerBundle provides a simple integration of the [MediaExposer](https://github.com/KnpLabs/MediaExposer "MediaExposer library on github")library for your Symfony project.

The MediaExposer Library
------------------------

[](#the-mediaexposer-library)

The [MediaExposer](https://github.com/KnpLabs/MediaExposer "MediaExposer library on github") library allows you to easily expose you medias to the users of your application by computing their urls or paths.

You can find more informations on the [official page](https://github.com/KnpLabs/MediaExposer "MediaExposer library on github").

Installation
------------

[](#installation)

The bundle depends on the [MediaExposer](https://github.com/KnpLabs/MediaExposer "MediaExposer library on github") library, so you need to copy it under the `vendor/media-exposer` directory of your Symfony project.

### Grab the sources

[](#grab-the-sources)

#### Using the `deps` file

[](#using-the-deps-file)

You can add the following lines to your `deps` file:

```
[media-exposer]
    git=http://github.com/KnpLabs/MediaExposer.git

[KnpMediaExposerBundle]
    git=http://github.com/KnpLabs/KnpMediaExposerBundle.git
    target=/bundles/Knp/Bundle/MediaExposerBundle
```

And run the command:

```
./bin/vendors install
```

#### Using git submodules

[](#using-git-submodules)

You can run the following git commands to add both library and bundle as submodules:

```
git submodule add https://github.com/KnpLabs/MediaExposer.git vendor/media-exposer
git submodule add https://github.com/KnpLabs/KnpMediaExposerBundle.git vendor/bundle/Knp/Bundle/MediaExposerBundle
```

### Update your autoloader &amp; kernel

[](#update-your-autoloader--kernel)

Once you have copied the sources in your project, you must update your autoloader:

```
