Skip to content

Instantly share code, notes, and snippets.

@rkueny
Created November 6, 2017 11:00
Show Gist options
  • Save rkueny/4dbb7ea4d5d3504d1d999a139ba7a025 to your computer and use it in GitHub Desktop.
Save rkueny/4dbb7ea4d5d3504d1d999a139ba7a025 to your computer and use it in GitHub Desktop.
<?php
// ...
public function getCacheDir()
{
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
return '/app-cache';
}
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}
public function getLogDir()
{
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
return '/app-logs';
}
return dirname(__DIR__).'/var/logs';
}
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment