-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Hi There,
May I suggest adding support for config.neon files?
For miscellaneous reasons, I am unable to use the pull feature here. However in light of its brevity I have simply included the driver below:
<?php
namespace Igorw\Silex;
use Nette\Neon;
class NeonConfigDriver implements ConfigDriver
{
public function load($filename)
{
if (!class_exists('Neon\\Neon')) {
throw new \RuntimeException('Unable to read neon as the Neon Parser is not installed.');
}
$config = Neon\Neon::decode(file_get_contents($filename));
return $config ?: array();
}
public function supports($filename)
{
return (bool) preg_match('#\.neon(\.dist)?$#', $filename);
}
}
Metadata
Metadata
Assignees
Labels
No labels