HSLG Media

FoundationController.php

FoundationController.php

Source file: wordpress/hslg-app-api/src/controllers/FoundationController.php

Module: wordpress-hslg-app-api

Size: 62 lines

SHA-256: 0ba10697fc1d8fd6bdb9eff997019cd1a97e9ba9d7c1ddbe7bf3bbb1b4977103

Responsibility

Hosts independently deployable HSLG-owned API endpoints and schema operations on WordPress/MariaDB.

Declared entry points

  • FoundationController — source line 13.
  • __construct — source line 15.
  • register_routes — source line 17.
  • health — source line 32.
  • venues — source line 39.
  • contentConfig — source line 47.
  • adminPermission — source line 52.
  • adminStatus — source line 56.

Imports and dependencies

  • Line 4: use Hslg\Backend\Services\Venues\ListVenues;
  • Line 5: use Hslg\WordPressApi\Database\SchemaInstaller;
  • Line 6: use Hslg\WordPressApi\Plugin;
  • Line 7: use Hslg\Backend\Database\Migrations\AccountOrderSchemaV3;

Behaviour and audit locations

  • Line 9: /** Thin HTTP adapter. WordPress handles REST registration and admin permissions.
  • Line 20: register_rest_route($this->namespace, $route, [
  • Line 22: // Explicitly public catalogue/configuration only. This permission
  • Line 24: 'permission_callback'=>'__return_true',
  • Line 27: register_rest_route($this->namespace, '/admin/status', [
  • Line 29: 'permission_callback'=>[$this,'adminPermission'],
  • Line 52: public function adminPermission(): bool|\WP_Error

Relationship to the system

This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.

Change verification

Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.