Small common tools used for Kitpages bundles

Installs: 12 828

Dependents: 5

Stars: 4

Watchers: 7

Forks: 2

Type: symfony-bundle

v3.0.2 2013-09-09 12:33 UTC


Only little methods for common problems :

  • create directories recursively
  • send a file to the browser for a download, sending an image or so what
  • ...

Actually I believe nobody will be interested in including this Bundle in it's project. This bundle is globally deprecated.

It is used mainly by the KitpagesCmsBundle.

WARNING, works only on unix/linux systems.


If you are using DEPS :


Add Kitpages namespace to your autoloader :

<?php // app/autoload.php

    // ...
    'Kitpages' => __DIR__.'/../vendor/bundles',

Enable the bundle in your kernel :

<?php // app/AppKernel.php

public function registerBundles()
    $bundles = array(
        // ...
        new Kitpages\UtilBundle\KitpagesUtilBundle(),

Then you can use the service which is named kitpages.util

User's guide

Let's say you are in a controller


$util = $this->get('kitpages.util');
// create recursively a directory
// delete recursively the test directory
// send a jpg image to the browser with a 3600 expire time
$util->getFile("/tmp/toto.jpg", 3600)