Small common tools used for Kitpages bundles

Installs: 36 978

Dependents: 6

Suggesters: 0

Security: 0

Stars: 4

Watchers: 9

Forks: 2

Open Issues: 0


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

This package is not auto-updated.

Last update: 2020-04-03 15:47:35 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)