blob: 3e055e5ccdca6913933c4c146b098256e71102e5 (
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
|
<?php
namespace JsonApi\Schemas;
class SlimRoute extends SchemaProvider
{
const TYPE = 'slim-routes';
protected $resourceType = self::TYPE;
public function getId($route)
{
return $route->getIdentifier();
}
public function getAttributes($route)
{
return [
'methods' => $route->getMethods(),
'pattern' => $route->getPattern(),
];
}
/**
* @inheritdoc
*/
public function getResourceLinks($resource)
{
return [];
}
}
|