Ejemplo n.º 1
0
 public static function set($page, $length = NULL)
 {
     if (is_array($page)) {
         list($page, $length) = self::setFromArray($page);
     }
     if (strlen($page) && strlen($length)) {
         //	Don't trust them to actually send the correct page, autofix any stupid things
         if (intval($page) < 0) {
             $page = 0;
         }
         //	Set the filters and calculate the offset based on that
         Amslib_Keystore::set("pager_page", intval($page));
         Amslib_Keystore::set("pager_length", intval($length));
         Amslib_Keystore::set("pager_offset", intval($page * $length));
     }
     return self::get();
 }