@@ 279-287 (lines=9) @@ | ||
276 | * @param string $list The type that you are listing |
|
277 | * @return array|string If any types exist an array will be returned else will return the error message |
|
278 | */ |
|
279 | protected function listFontTypes($list = 'weight') |
|
280 | { |
|
281 | $this->getJSONFile(); |
|
282 | if (array_key_exists($list, $this->orderedList)) { |
|
283 | $array = array_keys($this->orderedList[$list]); |
|
284 | sort($array); |
|
285 | return $array; |
|
286 | } |
|
287 | return $this->error_message; |
|
288 | } |
|
289 | ||
290 | /** |
|
@@ 296-303 (lines=8) @@ | ||
293 | * @param string $list This needs to be the value that you are searching on |
|
294 | * @return array|string If any fonts exist for the given parameters an array will be returned else will return the error message |
|
295 | */ |
|
296 | protected function listFonts($option, $list = 'weight') |
|
297 | { |
|
298 | $this->getJSONFile(); |
|
299 | if (array_key_exists($option, $this->orderedList[$list])) { |
|
300 | $array = array_keys($this->orderedList[$list][$option]); |
|
301 | return $array; |
|
302 | } |
|
303 | return $this->error_message; |
|
304 | } |
|
305 | } |
|
306 |