프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$bookmarks | array | ||
$callback | callable | ||
$limit | integer | ||
$offset | integer |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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. |
protected checkEndBookMarks ( ) : boolean | ||
리턴 | boolean |
public getIterator ( ) : Traversable | ||
리턴 | Traversable |
public paginateOver ( callable $callback ) | ||
$callback | callable |
protected paginationFinished ( integer $resultsNum ) : boolean | ||
$resultsNum | integer | |
리턴 | boolean |
protected processResponse ( seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse $response ) : array | ||
$response | seregazhuk\PinterestBot\Api\Contracts\PaginatedResponse | |
리턴 | array |
protected reachesLimit ( integer $resultsNum ) : boolean | ||
$resultsNum | integer | |
리턴 | boolean |