<?php

namespace MyApp\MyAppBundle;

use 
Symfony\Component\HttpKernel\Bundle\Bundle;
use 
MyApp\MyAppConfiguration as Config;

class 
MyAppBundle extends Bundle
{
    
/**
     * {@inheritdoc}
     */
    
public function boot()
    {
        
$conf Config::getInstance();
        if (
is_null($conf->getParam('cache'))) {
            
$cache = array(
                
'server' => $this->container->getParameter('my_app.cache.server'),
                
'port'   => $this->container->getParameter('my_app.cache.port'),
                
'expire' => $this->container->getParameter('my_app.cache.expire')
                );
            
$conf->addParams(array('cache' => $cache));
        }

    }
}