Issues (97)

src/RestfulServerList.php (2 issues)

1
<?php
2
3
namespace SilverStripe\RestfulServer;
4
5
/**
6
 * Restful server handler for a SS_List
7
 */
8
class RestfulServerList
9
{
10
    private static $url_handlers = array(
0 ignored issues
show
The private property $url_handlers is not used, and could be removed.
Loading history...
11
        '#ID' => 'handleItem',
12
    );
13
14
    public function __construct($list)
15
    {
16
        $this->list = $list;
0 ignored issues
show
Bug Best Practice introduced by
The property list does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
17
    }
18
19
    public function handleItem($request)
20
    {
21
        return new RestfulServerItem($this->list->getById($request->param('ID')));
22
    }
23
}
24