mirror of
https://github.com/silverstripe/silverstripe-textextraction
synced 2024-06-24 13:39:29 +02:00
f341010d7a
- Added namespaces, use statements - Added missing docblocks etc - Uses SS4's new Cache system - Uses proper environment vars - Cannot instantiate 'FileTextCache' (interface) as a service. This can be configured through YML, so default to FileTextCache_Cache - Modded YML config to make it run. - Fixes to allow TIKA to actually get file contents. - Addresses issues raised by @robbieaverill - Rebased against github.com/silverstripe/silverstripe-textextraction:master - Replaced `SS_Log` with Monolog.
32 lines
633 B
PHP
32 lines
633 B
PHP
<?php
|
|
|
|
namespace SilverStripe\TextExtraction\Extension;
|
|
|
|
use SilverStripe\Assets\File;
|
|
|
|
interface FileTextCache
|
|
{
|
|
/**
|
|
* Save extracted content for a given File entity
|
|
*
|
|
* @param File $file
|
|
* @param string $content
|
|
*/
|
|
public function save(File $file, $content);
|
|
|
|
/**
|
|
* Return any cached extracted content for a given file entity
|
|
*
|
|
* @param File $file
|
|
*/
|
|
public function load(File $file);
|
|
|
|
/**
|
|
* Invalidate the cache for a given file.
|
|
* Invoked in onBeforeWrite on the file
|
|
*
|
|
* @param File $file
|
|
*/
|
|
public function invalidate(File $file);
|
|
}
|