1 | <?php |
||
16 | class AssetManager extends TrackingManager |
||
17 | { |
||
18 | /** |
||
19 | * The location of where to write files to. |
||
20 | * |
||
21 | * @var Folder |
||
22 | */ |
||
23 | protected $outputDirectory; |
||
24 | |||
25 | /** |
||
26 | * Files or patterns to exclude from copying. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $excludes; |
||
31 | |||
32 | /** |
||
33 | * Files or patterns to ensure are copied regardless of excluded patterns. |
||
34 | * |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $includes; |
||
38 | |||
39 | protected $eventDispatcher; |
||
40 | protected $logger; |
||
41 | |||
42 | public function __construct(EventDispatcherInterface $eventDispatcher, LoggerInterface $logger) |
||
47 | |||
48 | public function configureFinder($includes = array(), $excludes = array()) |
||
53 | |||
54 | /** |
||
55 | * Set the target directory of where files should be written to. |
||
56 | * |
||
57 | * @param Folder $directory |
||
58 | */ |
||
59 | public function setFolder($directory) |
||
63 | |||
64 | /** |
||
65 | * Copy all of the assets. |
||
66 | */ |
||
67 | public function copyFiles() |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | public function refreshItem($filePath) |
||
91 | |||
92 | /** |
||
93 | * {@inheritdoc} |
||
94 | */ |
||
95 | public function shouldBeTracked($filePath) |
||
99 | |||
100 | /** |
||
101 | * {@inheritdoc} |
||
102 | */ |
||
103 | public function createNewItem($filePath) |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | protected function handleTrackableItem(File $file, array $options = array()) |
||
145 | } |
||
146 |