# datafeedr-api/1.0.125/Wuwei/Framework/Templates/Generic.php

Datafeedr API, version 1.0.125. 38 lines.

- Page: https://pluginprobe.com/plugins/datafeedr-api/1.0.125/code/Wuwei/Framework/Templates/Generic.php
- Raw: https://pluginprobe.com/plugins/datafeedr-api/1.0.125/raw/Wuwei/Framework/Templates/Generic.php
- Modified: 2018-02-08T16:35:32+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/datafeedr-api/1.0.125/code/Wuwei/Framework/Templates/Generic.php#L10-L20`.

```php
<?php namespace Datafeedr\Api\Wuwei\Templates;

/**
 * Template_Generic class.
 *
 * Extends the Template_Abstract class. Handles the get_file() and get_data() requests.
 *
 * @since 2.0.0
 */
class Generic extends Template {

	/**
	 * Returns full path to generic template file.
	 *
	 * @since 2.0.0
	 *
	 * @return string Full path to template file.
	 */
	public function get_file() {
		$ds   = \DIRECTORY_SEPARATOR;
		$path = realpath( __DIR__ . '/..' ) . $ds . 'Views' . $ds . 'generic' . $ds; // Requires PHP 5.3+
		$file = $path . $this->name;

		return $file;
	}

	/**
	 * Returns the array of data to use in our templates.
	 *
	 * @since 2.0.0
	 *
	 * @return array The data for use in our template file.
	 */
	public function get_data() {
		return $this->data;
	}
}

```
