Files
unsupervised-scheduler/src/Installer.php
T
thatguygriff 2fb2ca392d
CI / Coding Standards (push) Successful in 43s
CI / PHPStan (push) Successful in 52s
CI / Tests (PHP 8.1) (push) Successful in 47s
CI / Tests (PHP 8.2) (push) Successful in 49s
CI / Tests (PHP 8.3) (push) Successful in 37s
CI / No Debug Code (push) Successful in 2s
Restructure src/ and tests/ from package-by-type to package-by-domain
All classes are now organised by domain (Availability, Booking, Auth).
Each domain package contains its value object, repository, admin controller,
REST endpoint, and any shortcode pages under a matching sub-namespace.
Cross-cutting wiring (Plugin, AdminMenu, RestRegistrar, ShortcodeRegistrar,
Schema) lives at src/ root. Tests mirror the domain structure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 16:37:30 -03:00

28 lines
568 B
PHP

<?php
declare(strict_types=1);
namespace Unsupervised\Schedular;
use Unsupervised\Schedular\Auth\RoleManager;
class Installer {
public function run(): void {
$this->createTables();
( new RoleManager() )->createRoles();
flush_rewrite_rules();
update_option( 'us_schedular_version', USC_VERSION );
}
private function createTables(): void {
global $wpdb;
$charset = $wpdb->get_charset_collate();
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
foreach ( Schema::tables( $wpdb->prefix, $charset ) as $sql ) {
dbDelta( $sql );
}
}
}