mirror of
https://gh.wpcy.net/https://github.com/djav1985/v-wordpress-plugin-updater.git
synced 2026-05-04 14:29:01 +08:00
30 lines
768 B
PHP
30 lines
768 B
PHP
<?php
|
|
// phpcs:ignoreFile PSR1.Files.SideEffects.FoundWithSymbols
|
|
|
|
/**
|
|
* Project: UpdateAPI
|
|
* Author: Vontainment <services@vontainment.com>
|
|
* License: https://opensource.org/licenses/MIT MIT License
|
|
* Link: https://vontainment.com
|
|
* Version: 4.0.0
|
|
*
|
|
* File: Controller.php
|
|
* Description: WordPress Update API
|
|
*/
|
|
|
|
namespace App\Core;
|
|
|
|
class Controller
|
|
{
|
|
/**
|
|
* Renders a view file with the provided data.
|
|
*
|
|
* @param string $view The view name relative to the Views directory.
|
|
* @param array<string, mixed> $data Optional data extracted for use within the view.
|
|
*/
|
|
protected function render(string $view, array $data = []): void
|
|
{
|
|
extract($data);
|
|
require __DIR__ . '/../Views/' . $view . '.php';
|
|
}
|
|
}
|