aboutsummaryrefslogtreecommitdiff
path: root/src/phorkie/Search/Result.php
blob: 62e7bb80fc922c4b0c091612b04e8b251eb4a47f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace phorkie;

class Search_Result
{
    public $repos;
    public $results;
    public $page;
    public $perPage;

    public function getRepos()
    {
        return $this->repos;
    }

    /**
     * Returns the number of results
     *
     * @return integer Number of results
     */
    public function getResults()
    {
        return $this->results;
    }

    /**
     * Returns the number of the current page, 0 based
     *
     * @return integer Number of current page
     */
    public function getPage()
    {
        return $this->page;
    }

    /**
     * Returns the search results per page
     *
     * @return integer Number of results per page
     */
    public function getPerPage()
    {
        return $this->perPage;
    }

    public function getLink($query)
    {
        return 'search?q=' . urlencode($query);
    }
}

?>