public static function get($path, $data = [])
	{
		ob_start();

		extract($data);

		try {
			$basePath = static::getInstance()->basePath;

			if ($basePath !== null) {
				if (mb_substr($path, 0, 1) === static::DIRECTORY_SEPARATOR) {
					$path = mb_substr($path, 1);
				}

				if (mb_substr($basePath, -1) === static::DIRECTORY_SEPARATOR) {
					$basePath = mb_substr($basePath, 0, -1);
				}

				$path = $basePath . static::DIRECTORY_SEPARATOR . $path;
			}

			include $path;
		} catch (\Exception $e) {
			ob_get_clean();
			throw $e;
		}

		return ob_get_clean();
	}
public static function get($path, $data = [])
	{
		ob_start();

		extract($data);

		try {
			$basePath = static::getInstance()->basePath;

			if ($basePath !== null) {
				if (mb_substr($path, 0, 1) === static::DIRECTORY_SEPARATOR) {
					$path = mb_substr($path, 1);
				}

				if (mb_substr($basePath, -1) === static::DIRECTORY_SEPARATOR) {
					$basePath = mb_substr($basePath, 0, -1);
				}

				$path = $basePath . static::DIRECTORY_SEPARATOR . $path;
			}

			include $path;
		} catch (\Exception $e) {
			ob_get_clean();
			throw $e;
		}

		return ob_get_clean();
	}
public static function get ( $ path , $ data = [ ] ) { ob_start ( ) ; extract ( $ data ) ; try { $ basePath = static :: getInstance ( ) -> basePath ; if ( $ basePath !== null ) { if ( mb_substr ( $ path , 0 , 1 ) === static :: DIRECTORY_SEPARATOR ) { $ path = mb_substr ( $ path , 1 ) ; } if ( mb_substr ( $ basePath , - 1 ) === static :: DIRECTORY_SEPARATOR ) { $ basePath = mb_substr ( $ basePath , 0 , - 1 ) ; } $ path = $ basePath . static :: DIRECTORY_SEPARATOR . $ path ; } include $ path ; } catch ( \ Exception $ e ) { ob_get_clean ( ) ; throw $ e ; } return ob_get_clean ( ) ; }
Returns the view at the given path with the given data.

@param string $path
@param string[] $data = []
@return string a string representation of the view.
Returns the view at the given path with the given data .