# depicter/1.5.2/app/src/DataSources/Manager.php

Depicter — Popup &amp; Slider Builder, version 1.5.2. 61 lines.

- Page: https://pluginprobe.com/plugins/depicter/1.5.2/code/app/src/DataSources/Manager.php
- Raw: https://pluginprobe.com/plugins/depicter/1.5.2/raw/app/src/DataSources/Manager.php
- Modified: 2022-11-01T06:06:54+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.5.2/code/app/src/DataSources/Manager.php#L10-L20`.

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

/**
 * Chained api to access all data sources
 */
class Manager {

	/**
	 * Returns the instance of posts class
	 *
	 * @return Posts
	 */
	public function posts()
	{
		return \Depicter::resolve('depicter.dataSources.posts');
	}

	/**
	 * Returns the instance of products class
	 *
	 * @return Products
	 */
	public function products()
	{
		return \Depicter::resolve('depicter.dataSources.products');
	}

	/**
	 * Returns the instance of hand picked products class
	 *
	 * @return HandPickedProducts
	 */
	public function handPickedProducts()
	{
		return \Depicter::resolve('depicter.dataSources.handPickedProducts');
	}

	/**
	 * @param string $type
	 *
	 * @return Posts|Products|HandPickedProducts|bool
	 */
	public function getByType( $type ){
		if( 'wpPost' === $type || 'wpPage' === $type || 'wpPageHandpicked' == $type ){
			return $this->posts();
		}

		if( 'wooProducts' === $type  ){
			return $this->products();
		}

		if( 'wooHandpicks' === $type  ){
			return $this->handPickedProducts();
		}

		return false;
	}

}

```
