2015-10-21 01:03:34 +02:00
|
|
|
<?php
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
interface Publish
|
|
|
|
{
|
2015-10-21 01:03:34 +02:00
|
|
|
/**
|
2021-10-11 16:10:47 +02:00
|
|
|
* Publish the file with the given file ID.
|
2015-10-21 01:03:34 +02:00
|
|
|
*
|
|
|
|
* @param int $fileId ID of the file to be published
|
|
|
|
*/
|
|
|
|
public function publish($fileId);
|
|
|
|
|
|
|
|
/**
|
2021-10-11 16:10:47 +02:00
|
|
|
* Unpublish the file with the given file ID.
|
2015-10-21 01:03:34 +02:00
|
|
|
*
|
|
|
|
* @param int $fileId ID of the file to be unpublished
|
|
|
|
*/
|
|
|
|
public function unpublish($fileId);
|
|
|
|
|
2015-11-16 22:18:29 +01:00
|
|
|
/**
|
2021-10-11 16:10:47 +02:00
|
|
|
* Fetch the publication status for the file with the given ID.
|
2015-11-16 22:18:29 +01:00
|
|
|
*
|
|
|
|
* @param int $fileId the ID of the file to check
|
|
|
|
*
|
|
|
|
* @return int 1 if the file has been published,
|
|
|
|
* 0 if the file has yet to be published,
|
|
|
|
* -1 if the file is in a pending state,
|
|
|
|
* 2 if the source is unreachable (disconnected)
|
|
|
|
*/
|
|
|
|
public function getPublishStatus($fileId);
|
2021-10-11 16:10:47 +02:00
|
|
|
}
|