2015-09-03 07:46:08 +02:00
|
|
|
<?php
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
namespace SilverStripe\Assets\Storage;
|
2015-09-03 07:46:08 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides a mechanism for suggesting filename alterations to a file
|
|
|
|
*
|
|
|
|
* Does not actually check for existence of the file, but rather comes up with as many suggestions for
|
|
|
|
* the given file as possible to a finite limit.
|
|
|
|
*/
|
|
|
|
interface AssetNameGenerator extends \Iterator {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Construct a generator for the given filename
|
|
|
|
*
|
|
|
|
* @param string $filename
|
|
|
|
*/
|
|
|
|
public function __construct($filename);
|
2015-09-15 04:52:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Number of attempts allowed
|
|
|
|
*
|
|
|
|
* @return int
|
|
|
|
*/
|
|
|
|
public function getMaxTries();
|
2015-09-03 07:46:08 +02:00
|
|
|
}
|