5 * @author Galen Grover <galenjr@gmail.com>
6 * @license http://opensource.org/licenses/mit-license.php The MIT License
9 namespace Instagram\Collection;
14 * Holds a collection of users
16 class UserCollection extends \Instagram\Collection\CollectionAbstract {
19 * Set the collection data
21 * @param StdClass $raw_data
24 public function setData( $raw_data ) {
25 $this->data = $raw_data->data;
26 $this->pagination = isset( $raw_data->pagination ) ? $raw_data->pagination : null;
27 $this->convertData( '\Instagram\User' );
33 * Get the next max cursor for use in pagination
35 * @return string Returns the next max cursor
38 public function getNextCursor() {
39 return isset( $this->pagination->next_cursor ) && !empty( $this->pagination->next_cursor ) ? $this->pagination->next_cursor : null;
45 * Get the next max cursor for use in pagination
47 * @return string Returns the next max cursor
50 public function getNext() {
51 return $this->getNextCursor();