# depicter/1.6.2/app/src/DataSources/DataSourceBase.php

Depicter — Popup &amp; Slider Builder, version 1.6.2. 80 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.6.2/code/app/src/DataSources/DataSourceBase.php
- Raw: https://pluginprobe.com/plugins/depicter/1.6.2/raw/app/src/DataSources/DataSourceBase.php
- Modified: 2023-02-09T06:22:12+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/depicter/1.6.2/code/app/src/DataSources/DataSourceBase.php#L10-L20`.

```php
<?php
namespace Depicter\DataSources;

use Averta\Core\Utility\Arr;

class DataSourceBase
{
	/**
	 * DataSource name
	 *
	 * @var string
	 */
	protected $type = 'base';

	/**
	 * DataSource properties
	 *
	 * @var array
	 */
	protected $properties = [];

	/**
	 * Default input params for retrieving dataSource records
	 *
	 * @var array
	 */
	protected $defaultInputParams = [];

	/**
	 * Asset groups of this DataSource
	 *
	 * @var array
	 */
	protected $assetGroupNames = [];


	/**
	 * Prepares arguments for retrieving dataSource records
	 *
	 * @param array|object $args
	 *
	 * @return array
	 */
	protected function prepare( $args ){
		$defaultParams = Arr::merge( $this->defaultInputParams, $this->getProperties() );
		return Arr::merge( $args, $defaultParams );
	}

	/**
	 * Get a property value
	 *
	 * @param string $name
	 *
	 * @return string|null
	 */
	public function getProperty( string $name ){
		return $this->properties[ $name ] ?? null;
	}

	/**
	 * Get all dataSource properties
	 *
	 * @return array|string[]
	 */
	public function getProperties(){
		return $this->properties;
	}

	/**
	 * Get asset groups of this DataSource
	 *
	 * @return array
	 */
	public function getAssetGroupNames(){
		return $this->assetGroupNames;
	}


}

```
