v-wordpress-plugin-updater/update-api/app/Core/Controller.php
nikolai@vontainment.com 56de91b1b9 ddf
2026-03-05 17:06:54 -05:00

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';
}
}