1 | <?php |
||
14 | class Base implements Schemable |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * basically application name |
||
19 | * |
||
20 | * @var string $name |
||
21 | */ |
||
22 | protected $name = null; |
||
23 | |||
24 | /** |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $id = null; |
||
29 | |||
30 | /** |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $version = null; |
||
35 | |||
36 | /** |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $baseUrl = null; |
||
41 | |||
42 | /** |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | protected $basePath = null; |
||
47 | |||
48 | /** |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | protected $documentationUrl = null; |
||
53 | |||
54 | /** |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $description = null; |
||
59 | |||
60 | /** |
||
61 | * |
||
62 | * @var array $mandatoryFields |
||
63 | */ |
||
64 | protected $mandatoryFields = [ |
||
65 | 'id', |
||
66 | 'baseUrl', |
||
67 | 'basePath', |
||
68 | 'documentationUrl', |
||
69 | 'version', |
||
70 | 'description' |
||
71 | ]; |
||
72 | |||
73 | /** |
||
74 | * |
||
75 | * @param array $options |
||
76 | */ |
||
77 | 3 | public function __construct(array $options = null) |
|
86 | |||
87 | /** |
||
88 | * |
||
89 | * @param string $name |
||
90 | */ |
||
91 | 3 | public function setName($name) |
|
95 | |||
96 | 3 | public function setId($id) |
|
100 | |||
101 | 3 | public function setVersion($version) |
|
105 | |||
106 | /** |
||
107 | * |
||
108 | * @param string $baseUrl |
||
109 | */ |
||
110 | 3 | public function setBaseUrl($baseUrl) |
|
114 | |||
115 | /** |
||
116 | * |
||
117 | * @param string $basePath |
||
118 | */ |
||
119 | 3 | public function setBasePath($basePath) |
|
123 | |||
124 | /** |
||
125 | * |
||
126 | * @param string $documentationUrl |
||
127 | */ |
||
128 | 3 | public function setDocumentationUrl($documentationUrl) |
|
132 | |||
133 | /** |
||
134 | * |
||
135 | * @param string $description |
||
136 | */ |
||
137 | 3 | public function setDescription($description) |
|
141 | |||
142 | /** |
||
143 | * |
||
144 | * |
||
145 | * (non-PHPdoc) |
||
146 | * |
||
147 | * @see \Solvire\API\JSONSchema\Schemable::allSet() |
||
148 | * @return s true or blows up |
||
149 | */ |
||
150 | 3 | public function allSet() |
|
163 | |||
164 | /** |
||
165 | * dish it up |
||
166 | * (non-PHPdoc) |
||
167 | * |
||
168 | * @see \Solvire\API\JSONSchema\Schemable::toSchema() |
||
169 | */ |
||
170 | 3 | public function toSchema() |
|
185 | } |
||
186 | |||
187 |