# shopbuilder/trunk/app/Abstracts/AbsSettings.php

ShopBuilder – WooCommerce Builder For Elementor, version trunk. 63 lines.

- Page: https://pluginprobe.com/plugins/shopbuilder/trunk/code/app/Abstracts/AbsSettings.php
- Raw: https://pluginprobe.com/plugins/shopbuilder/trunk/raw/app/Abstracts/AbsSettings.php
- Modified: 2024-01-05T06:10:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/shopbuilder/trunk/code/app/Abstracts/AbsSettings.php#L10-L20`.

```php
<?php

namespace RadiusTheme\SB\Abstracts;

// Do not allow directly accessing this file.
use RadiusTheme\SB\Models\DataModel;

if ( ! defined( 'ABSPATH' ) ) {
	exit( 'This script cannot be accessed directly.' );
}

/**
 * Template Related Settings
 */
abstract class AbsSettings {
	/**
	 * @var
	 */
	private $source;

	/**
	 * Set Source
	 */
	public function __construct() {
		$this->source = DataModel::source( $this->source() );
	}

	/**
	 * @return string
	 */
	abstract public function source();

	/**
	 * @param $key
	 * @param $value
	 *
	 * @return void
	 */
	public function set_option( $key, $value ) {
		$this->source->set_option( $key, $value );
	}

	/**
	 * @param $key
	 * @param $default
	 *
	 * @return mixed|null
	 */
	public function get_option( $key, $default = null ) {
		return $this->source->get_option( $key, $default);
	}

	/**
	 * @param $key
	 *
	 * @return true
	 */
	public function delete_option( $key ) {
		return $this->source->delete_option( $key);
	}

}

```
