mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-01 04:29:53 +09:00
Update to laravel 7
This commit is contained in:
@@ -2,89 +2,103 @@
|
||||
|
||||
namespace Github;
|
||||
|
||||
use Github\Api\ApiInterface;
|
||||
use Generator;
|
||||
use Github\Api\AbstractApi;
|
||||
|
||||
/**
|
||||
* Pager interface.
|
||||
*
|
||||
* @author Ramon de la Fuente <ramon@future500.nl>
|
||||
* @author Mitchel Verschoof <mitchel@future500.nl>
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
*/
|
||||
interface ResultPagerInterface
|
||||
{
|
||||
/**
|
||||
* @return null|array pagination result of last request
|
||||
*/
|
||||
public function getPagination();
|
||||
|
||||
/**
|
||||
* Fetch a single result (page) from an api call.
|
||||
*
|
||||
* @param ApiInterface $api the Api instance
|
||||
* @param string $method the method name to call on the Api instance
|
||||
* @param array $parameters the method parameters in an array
|
||||
* @param AbstractApi $api the Api instance
|
||||
* @param string $method the method name to call on the Api instance
|
||||
* @param array $parameters the method parameters in an array
|
||||
*
|
||||
* @return array returns the result of the Api::$method() call
|
||||
*/
|
||||
public function fetch(ApiInterface $api, $method, array $parameters = []);
|
||||
public function fetch(AbstractApi $api, string $method, array $parameters = []): array;
|
||||
|
||||
/**
|
||||
* Fetch all results (pages) from an api call.
|
||||
*
|
||||
* Use with care - there is no maximum.
|
||||
*
|
||||
* @param ApiInterface $api the Api instance
|
||||
* @param string $method the method name to call on the Api instance
|
||||
* @param array $parameters the method parameters in an array
|
||||
* @param AbstractApi $api the Api instance
|
||||
* @param string $method the method name to call on the Api instance
|
||||
* @param array $parameters the method parameters in an array
|
||||
*
|
||||
* @return array returns a merge of the results of the Api::$method() call
|
||||
*/
|
||||
public function fetchAll(ApiInterface $api, $method, array $parameters = []);
|
||||
public function fetchAll(AbstractApi $api, string $method, array $parameters = []): array;
|
||||
|
||||
/**
|
||||
* Lazily fetch all results (pages) from an api call.
|
||||
*
|
||||
* Use with care - there is no maximum.
|
||||
*
|
||||
* @param AbstractApi $api the Api instance
|
||||
* @param string $method the method name to call on the Api instance
|
||||
* @param array $parameters the method parameters in an array
|
||||
*
|
||||
* @return \Generator returns a merge of the results of the Api::$method() call
|
||||
*/
|
||||
public function fetchAllLazy(AbstractApi $api, string $method, array $parameters = []): Generator;
|
||||
|
||||
/**
|
||||
* Method that performs the actual work to refresh the pagination property.
|
||||
*
|
||||
* @deprecated since 3.2 and will be removed in 4.0.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function postFetch();
|
||||
public function postFetch(): void;
|
||||
|
||||
/**
|
||||
* Check to determine the availability of a next page.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasNext();
|
||||
public function hasNext(): bool;
|
||||
|
||||
/**
|
||||
* Check to determine the availability of a previous page.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasPrevious();
|
||||
public function hasPrevious(): bool;
|
||||
|
||||
/**
|
||||
* Fetch the next page.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchNext();
|
||||
public function fetchNext(): array;
|
||||
|
||||
/**
|
||||
* Fetch the previous page.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchPrevious();
|
||||
public function fetchPrevious(): array;
|
||||
|
||||
/**
|
||||
* Fetch the first page.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchFirst();
|
||||
public function fetchFirst(): array;
|
||||
|
||||
/**
|
||||
* Fetch the last page.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function fetchLast();
|
||||
public function fetchLast(): array;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user