1<?php
2
3/*
4 * This file is part of the Assetic package, an OpenSky project.
5 *
6 * (c) 2010-2014 OpenSky Project Inc
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace Assetic\Factory\Worker;
13
14use Assetic\Asset\AssetInterface;
15use Assetic\Factory\AssetFactory;
16
17/**
18 * Assets are passed through factory workers before leaving the factory.
19 *
20 * @author Kris Wallsmith <kris.wallsmith@gmail.com>
21 */
22interface WorkerInterface
23{
24    /**
25     * Processes an asset.
26     *
27     * @param AssetInterface $asset   An asset
28     * @param AssetFactory   $factory The factory
29     *
30     * @return AssetInterface|null May optionally return a replacement asset
31     */
32    public function process(AssetInterface $asset, AssetFactory $factory);
33}
34