mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
2b316e79e5
Provides an interface for classes to implement their own flush() functionality. This function gets called early in a request on all implementations of Flushable when flush=1|all is requested in the URL. This fix came out of an issue where Requirements combined files were not being cleaned up after dev/build?flush=1, due to the fact that flush would only occur when you called it while on a page that used those combined files, but not in any other contexts. This will now call flush on any implementors of Flushable regardless of the context of where flush was called.
21 lines
504 B
PHP
21 lines
504 B
PHP
<?php
|
|
/**
|
|
* Provides an interface for classes to implement their own flushing functionality
|
|
* whenever flush=1 is requested.
|
|
*
|
|
* @package framework
|
|
* @subpackage core
|
|
*/
|
|
interface Flushable {
|
|
|
|
/**
|
|
* This function is triggered early in the request if the "flush" query
|
|
* parameter has been set. Each class that implements Flushable implements
|
|
* this function which looks after it's own specific flushing functionality.
|
|
*
|
|
* @see FlushRequestFilter
|
|
*/
|
|
public static function flush();
|
|
|
|
}
|