/** * Create the Paginator with the Url::current. It's a shortcut to quickly build it with the request URI * * @param string $pattern - a regex pattern that will match the url and extract the page number * @param int $total - Total items found * @param int $size - Total items per page * @param int $displays - The displays size * @return Paginator */ public static function create($pattern = "/page/(:num)", $total = 0, $size = 10, $displays = 10) { return new self(Url::current(), $pattern, $total, $size, $displays); }
public function testCurrentFull() { $url = Url::current(null, true); $this->assertEquals('http://apple.com/test', $url); }
/** * Get current url * * @param array $query * @param bool $full * @return string */ function current_url(array $query = null, $full = false) { return Url::current($query, $full); }