targetProperty = $property; return $this; } public function hasTargetProperty() { return $this->targetProperty !== null; } public function getTargetProperty($default = null) { if ($this->targetProperty === null) { return $default; } return $this->targetProperty; } public function setDb(Db $db) { $this->db = $db; return $this; } public function getDb() { return $this->db; } public function setSettings($settings) { $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; } } /** * Methode to transform the given value * * @return value */ abstract public function transform($value); /** * Override this method if you want to extend the settings form * * @param QuickForm $form QuickForm that should be extended * @return QuickForm */ public static function addSettingsFormFields(QuickForm $form) { return $form; } }