public function getPreference($key, $default = null) { return array_get($this->preferences, $key, $default); }