1 | <?php |
||
16 | class DeploynautAPI extends APINoun |
||
17 | { |
||
18 | |||
19 | /** |
||
20 | * Default URL handlers - (Action)/(ID)//(OtherID) |
||
21 | * |
||
22 | * @var array |
||
23 | */ |
||
24 | private static $url_handlers = array( |
||
25 | '' => 'listProjects', |
||
26 | '$Project//fetch' => 'project', |
||
27 | '$Project/$Environment!' => 'environment', |
||
28 | '$Project/' => 'project', |
||
29 | ); |
||
30 | |||
31 | /** |
||
32 | * @var array |
||
33 | */ |
||
34 | public static $allowed_actions = array( |
||
35 | 'project', |
||
36 | 'environment', |
||
37 | 'listProjects' |
||
38 | ); |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | protected $link = 'deploynaut/api'; |
||
44 | |||
45 | /** |
||
46 | * @param SS_HTTPRequest $request |
||
47 | * @return SS_HTTPResponse |
||
48 | */ |
||
49 | public function listProjects(SS_HTTPRequest $request) |
||
71 | |||
72 | /** |
||
73 | * Controller Action |
||
74 | * |
||
75 | * @param SS_HTTPRequest $request |
||
76 | * @return APIProject |
||
77 | */ |
||
78 | public function project(SS_HTTPRequest $request) |
||
86 | |||
87 | /** |
||
88 | * Controller Action |
||
89 | * |
||
90 | * @param SS_HTTPRequest $request |
||
91 | * @return APIEnvironment |
||
92 | */ |
||
93 | public function environment(SS_HTTPRequest $request) |
||
106 | |||
107 | /** |
||
108 | * @return SS_HTTPResponse |
||
109 | */ |
||
110 | protected function project404Response() |
||
115 | |||
116 | /** |
||
117 | * @return SS_HTTPResponse |
||
118 | */ |
||
119 | protected function environment404Response() |
||
124 | |||
125 | /** |
||
126 | * Get project from URL |
||
127 | * |
||
128 | * @return DNProject |
||
129 | */ |
||
130 | protected function getProject() |
||
135 | |||
136 | /** |
||
137 | * Get environment from URL |
||
138 | * |
||
139 | * @return DNEnvironment |
||
140 | */ |
||
141 | protected function getEnvironment() |
||
148 | |||
149 | /** |
||
150 | * @return string |
||
151 | */ |
||
152 | public function Link() |
||
156 | } |
||
157 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.