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(
11
        '#ID' => 'handleItem',
12
    );
13

14 0
    public function __construct($list)
15
    {
16 0
        $this->list = $list;
17
    }
18

19 0
    public function handleItem($request)
20
    {
21 0
        return new RestfulServerItem($this->list->getById($request->param('ID')));
22
    }
23
}

Read our documentation on viewing source code .

Loading