Свойство | Type | Description | |
---|---|---|---|
$bookmarks | array | ||
$callback | callable | ||
$limit | integer | ||
$offset | integer |
Méthode | Description | |
---|---|---|
__construct ( integer $limit = self::DEFAULT_LIMIT ) | ||
get ( ) : Traversable | Syntax sugar for getIterator method | |
getIterator ( ) : Traversable | Retrieve an external iterator | |
paginateOver ( callable $callback ) | Sets a callback to make requests. Should be a closure that accepts a $bookmarks array as an argument. | |
skip ( integer $offset ) | ||
take ( integer $limit ) | ||
toArray ( ) : array |
Méthode | Description | |
---|---|---|
checkEndBookMarks ( ) : boolean | Checks for -end- substring in bookmarks. This is pinterest sign of the finished pagination. | |
getCurrentResults ( ) : array | ||
paginationFinished ( integer $resultsNum ) : boolean | ||
processResponse ( seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse $response ) : array | ||
reachesLimit ( integer $resultsNum ) : boolean | Check if we get results limit in pagination. |
public __construct ( integer $limit = self::DEFAULT_LIMIT ) | ||
$limit | integer |
protected checkEndBookMarks ( ) : boolean | ||
Résultat | boolean |
public get ( ) : Traversable | ||
Résultat | Traversable |
public getIterator ( ) : Traversable | ||
Résultat | Traversable |
public paginateOver ( callable $callback ) | ||
$callback | callable |
protected paginationFinished ( integer $resultsNum ) : boolean | ||
$resultsNum | integer | |
Résultat | boolean |
protected processResponse ( seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse $response ) : array | ||
$response | seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse | |
Résultat | array |
protected reachesLimit ( integer $resultsNum ) : boolean | ||
$resultsNum | integer | |
Résultat | boolean |