Skip to content

Instantly share code, notes, and snippets.

@damaya
Created May 16, 2015 00:51
Show Gist options
  • Select an option

  • Save damaya/20f785ddaad226002871 to your computer and use it in GitHub Desktop.

Select an option

Save damaya/20f785ddaad226002871 to your computer and use it in GitHub Desktop.
Contribuir con validación de environment del ezpublish kernel y justificarlo
*/
public function registerContainerConfiguration( LoaderInterface $loader )
{
$environment = $this->getEnvironment();
$loader->load( __DIR__ . '/config/config_' . $environment . '.yml' );
$configFile = __DIR__ . '/config/ezpublish_' . $environment . '.yml';
if ( !is_file( $configFile ) )
{
$configFile = __DIR__ . '/config/ezpublish_setup.yml';
}
if ( !is_readable( $configFile ) )
{
throw new RuntimeException( "Configuration file '$configFile' is not readable." );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment