getSlice() public method

Helper method for getting only a slice of the total tasks in this list.
public getSlice ( integer $page, integer $perpage = null ) : Nag_Task
$page integer The starting page.
$perpage integer The count of tasks per page.
return Nag_Task The resulting task list.
Ejemplo n.º 1
0
 /**
  * Fetch the matching resources that should appear on the current page
  *
  * @param integer $page     Start page.
  * @param integer $perpage  Number of tasks per page.
  *
  * @return Nag_Task  A list of tasks.
  */
 public function getSlice($page = 0, $perpage = null)
 {
     // Refresh the search
     $this->runSearch();
     return $this->_tasks->getSlice($page, $perpage);
 }