|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of the Symfony framework. |
|
|
5 |
* |
|
|
6 |
* (c) Fabien Potencier <fabien@symfony.com> |
|
|
7 |
* |
|
|
8 |
* This source file is subject to the MIT license that is bundled |
|
|
9 |
* with this source code in the file LICENSE. |
|
|
10 |
*/ |
|
|
11 |
|
|
|
12 |
namespace Symfony\Bundle\AsseticBundle\Factory\Loader; |
|
|
13 |
|
|
|
14 |
use Assetic\Factory\Loader\FormulaLoaderInterface; |
|
|
15 |
use Assetic\Factory\Resource\ResourceInterface; |
|
|
16 |
use Symfony\Bundle\AsseticBundle\Factory\Resource\ConfigurationResource; |
|
|
17 |
|
|
|
18 |
/** |
|
|
19 |
* Loads configured formulae. |
|
|
20 |
* |
|
|
21 |
* @author Kris Wallsmith <kris@symfony.com> |
|
|
22 |
*/ |
|
|
23 |
class ConfigurationLoader implements FormulaLoaderInterface |
|
|
24 |
{ |
|
|
25 |
public function load(ResourceInterface $resource) |
|
|
26 |
{ |
|
|
27 |
return $resource instanceof ConfigurationResource ? $resource->getContent() : array(); |
|
|
28 |
} |
|
|
29 |
} |