2015-12-09 22:19:23 +01:00
|
|
|
<?php
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
namespace SilverStripe\Assets\Storage;
|
2015-12-09 22:19:23 +01:00
|
|
|
|
2016-09-09 08:43:05 +02:00
|
|
|
use SilverStripe\Control\HTTPResponse;
|
|
|
|
use SilverStripe\Control\HTTPResponse_Exception;
|
2015-12-09 22:19:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Represents a store usable with ProtectedFileController to serve up non-direct file requests
|
|
|
|
*/
|
|
|
|
interface AssetStoreRouter {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Generate a custom HTTP response for a request to a given asset, identified by a path.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string $asset Asset path name, omitting any leading 'assets'
|
2016-09-09 08:43:05 +02:00
|
|
|
* @return HTTPResponse
|
|
|
|
* @throws HTTPResponse_Exception
|
2015-12-09 22:19:23 +01:00
|
|
|
*/
|
|
|
|
public function getResponseFor($asset);
|
|
|
|
}
|