Medical Appointments API

Main
in package

The main class responsible for initializing the Slim application and running it.

Tags
OA\Info

( title="Medical Appointments API", description="A RESTful API for managing medical appointments.", version="1.0.0", @OA\Contact( email="contacto@luisgraciano.dev", name="Luis Graciano" ) )

OA\Server

( url="http://localhost:8080", description="Local server" )

OA\Server

( url="https://medical-appointments.luisgraciano.dev/api", description="QA server" )

Table of Contents

main()  : void
Entry point of the application.
addApiRoutes()  : void
Adds the API routes to the given Slim application.
addApiRoutesForControllers()  : void
Add API routes to the given RouteCollectorProxy.
addClassToContainer()  : T
Adds the given class to the container and returns an instance of it.
getContainer()  : Container
Creates and returns a container with all the dependencies.

Methods

main()

Entry point of the application.

public static main() : void

Initializes and runs the Slim application.

Return values
void

addApiRoutes()

Adds the API routes to the given Slim application.

private static addApiRoutes(App $router) : void
Parameters
$router : App

The Slim application to add the routes to.

Return values
void

addApiRoutesForControllers()

Add API routes to the given RouteCollectorProxy.

private static addApiRoutesForControllers(RouteCollectorProxy $group) : void
Parameters
$group : RouteCollectorProxy

The Slim RouteCollectorProxy for adding routes.

Return values
void

addClassToContainer()

Adds the given class to the container and returns an instance of it.

private static addClassToContainer(Container $container, class-string<\App\T> $class[, array<string|int, mixed> $params = [] ]) : T
Parameters
$container : Container

The container to add the class to.

$class : class-string<\App\T>

The class to add to the container.

$params : array<string|int, mixed> = []

The parameters to pass to the class constructor.

Tags
template

T The type of the class to add to the container.

throws
RuntimeException

If an error occurs while setting up the container.

Return values
T

An instance of the given class.

getContainer()

Creates and returns a container with all the dependencies.

private static getContainer() : Container
Return values
Container

The container with all the dependencies.

Search results