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-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Control\SS_HTTPResponse;
|
|
|
|
use SilverStripe\Control\SS_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'
|
|
|
|
* @return SS_HTTPResponse
|
|
|
|
* @throws SS_HTTPResponse_Exception
|
|
|
|
*/
|
|
|
|
public function getResponseFor($asset);
|
|
|
|
}
|