Enable: a2ensite mysiteavailable-site
Disable: a2dissite mysiteavailable-site
Monday, October 24, 2011
Friday, October 21, 2011
Format getCreatedAt and getUpdatedAt in Symfony
Example....
echo $article->getDateTimeObject('created_at')->format('m/d/Y');
Labels:
symfony,
timestampable
Thursday, October 6, 2011
Clear Cache from Action in Symfony
/**
* Delete cache for application and environment
*
* @param string $app aplicación
* @param string $env entorno
*/
function clear_cache ($app, $env)
{
$cacheDir = sfConfig::get('sf_cache_dir').'/'. $app.'/'.$env.'/';
//Clear cache
$cache = new sfFileCache(array('cache_dir' => $cacheDir));
$cache->clean();
}
Subscribe to:
Comments (Atom)