Skip to content

Instantly share code, notes, and snippets.

@ahuggins
Created September 3, 2016 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahuggins/a1eac206226f7c751a23bab61122c892 to your computer and use it in GitHub Desktop.
Save ahuggins/a1eac206226f7c751a23bab61122c892 to your computer and use it in GitHub Desktop.
<?php
public function get($topic, $specific = null, $param = null)
{
if (isset($this->config[$topic])) {
$value = $this->config[$topic];
}
if (! is_null($specific) && isset($value[$specific])) {
$value = $value[$specific];
}
if (! is_null($param) && isset($value[$param])) {
$value = $value[$param];
}
return $value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment