DataTypeHook: also add getSetting helper method

This commit is contained in:
Thomas Gelf 2016-03-05 17:04:38 +01:00
parent d7da41b789
commit f23c074143
1 changed files with 9 additions and 0 deletions

View File

@ -40,4 +40,13 @@ abstract class DataTypeHook
$this->settings = $settings;
return $this;
}
public function getSetting($name, $default = null)
{
if (array_key_exists($name, $this->settings)) {
return $this->settings[$name];
} else {
return $default;
}
}
}