Urlaubsplan
Lade ...
Suche ...
Keine Treffer
App::Controllers::Api::UrlaubController Klassenreferenz
Klassendiagramm für App::Controllers::Api::UrlaubController:
Zusammengehörigkeiten von App::Controllers::Api::UrlaubController:

Öffentliche Attribute

path : "/api/urlaub/{year}/{month}"
 HTTP-spezifischer Kontext.
 
path tags: ["Urlaub"]
 
path summary: "Retrieve holiday and leave data for a specific month and year"
 
path parameters: [ new OA\Parameter( name: "year"
 
path in: "path"
 
path required: true
 
path description: "Year of the query"
 
path schema: new OA\Schema(type: "integer"
 
path example: 2024) )
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] responses: [ new OA\Response( response: 200
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] description: "Holiday and leave data retrieved successfully"
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] content: new OA\JsonContent( properties: [ new OA\Property(property: "users"
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] type: "array"
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] items: new OA\Items( properties: [ new OA\Property(property: "first_name"
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] example: "John")
 
path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] new OA Property(property:"last_name", type:"string", example:"Doe") new OA Property(property:"events", type:"array", items:new OA\Items(properties:[new OA\Property(property:"start_date", type:"string", example:"2024-05-01"), new OA\Property(property:"end_date", type:"string", example:"2024-05-03"), new OA\Property(property:"type", type:"string", example:"vacation"), new OA\Property(property:"status", type:"string", example:"approved")]))])) new OA Property(property:"holidays", type:"array", items:new OA\Items(properties:[new OA\Property(property:"date", type:"string", example:"2024-05-01"), new OA\Property(property:"name", type:"string", example:"Labor Day")]))])) new OA Response(response:404, description:"No data found for the given month and year", content:new OA\JsonContent(properties:[new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Daten gefunden.")]))])] public function index($year $month
 
 $userModel = new User()
 
 $holidayModel = new HolidayModel()
 
 $events = $urlaubModel->getUrlaubByMonth($year, $month)
 
 $users = $userModel->findAll()
 
 $holidays = $holidayModel->getHolidays()
 

Ausführliche Beschreibung

UrlaubController

Controller zur Verwaltung von Urlaubs- und Feiertagsinformationen für Mitarbeiter.

Dokumentation der Datenelemente

◆ $events

App::Controllers::Api::UrlaubController::$events = $urlaubModel->getUrlaubByMonth($year, $month)

◆ $holidayModel

App::Controllers::Api::UrlaubController::$holidayModel = new HolidayModel()

◆ $holidays

App::Controllers::Api::UrlaubController::$holidays = $holidayModel->getHolidays()

◆ $month

path new OA Parameter(name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] new OA Property(property:"last_name", type:"string", example:"Doe") new OA Property(property:"events", type:"array", items:new OA\Items(properties:[new OA\Property(property:"start_date", type:"string", example:"2024-05-01"), new OA\Property(property:"end_date", type:"string", example:"2024-05-03"), new OA\Property(property:"type", type:"string", example:"vacation"), new OA\Property(property:"status", type:"string", example:"approved")]))])) new OA Property(property:"holidays", type:"array", items:new OA\Items(properties:[new OA\Property(property:"date", type:"string", example:"2024-05-01"), new OA\Property(property:"name", type:"string", example:"Labor Day")]))])) new OA Response (response:404, description:"No data found for the given month and year", content:new OA\JsonContent( properties:[ new OA\Property(property:"status", type:"string", example:"error"), new OA\Property(property:"message", type:"string", example:"Keine Daten gefunden.")]))])] public function index( $year App::Controllers::Api::UrlaubController::$month
Initialisierung:
{
$urlaubModel = new UrlaubModel()

◆ $userModel

App::Controllers::Api::UrlaubController::$userModel = new User()

◆ $users

App::Controllers::Api::UrlaubController::$users = $userModel->findAll()

◆ __pad0__

path App::Controllers::Api::UrlaubController::__pad0__

HTTP-spezifischer Kontext.

Gibt Urlaubs- und Feiertagsinformationen für einen bestimmten Monat und ein Jahr zurück.

Parameter
int$yearDas Jahr der Abfrage
int$monthDer Monat der Abfrage
Rückgabe
Namespace: CodeIgniter
JSON-Antwort mit Benutzerdaten, Events und Feiertagen

API-Endpunkt {get} /api/urlaub/:year/:month Urlaubs- und Feiertagsdaten abrufen

API Name: \1 GetMonthlyUrlaub
API Group: \1 Urlaub
API Parameter: \1 {Number} year Das Jahr, für das die Daten abgerufen werden sollen
API Parameter: \1 {Number} month Der Monat, für den die Daten abgerufen werden sollen
API Success: \1 {Object[]} users Liste der Benutzer und ihre Urlaube
API Success: \1 {Object[]} holidays Liste der Feiertage im angegebenen Monat
API Error: \1 404 Keine Daten gefunden

◆ content

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::content

◆ description [1/2]

path App::Controllers::Api::UrlaubController::description

◆ description [2/2]

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::description

◆ example [1/2]

path App::Controllers::Api::UrlaubController::example

◆ example [2/2]

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::example

◆ in

path App::Controllers::Api::UrlaubController::in

◆ items

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::items

◆ parameters

path App::Controllers::Api::UrlaubController::parameters

◆ required

path App::Controllers::Api::UrlaubController::required

◆ responses

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::responses

◆ schema

path App::Controllers::Api::UrlaubController::schema

◆ summary

path App::Controllers::Api::UrlaubController::summary

◆ tags

path App::Controllers::Api::UrlaubController::tags

◆ type

path new OA Parameter (name:"month", in:"path", required:true, description:"Month of the query", schema:new OA\Schema(type:"integer", example:5))] App::Controllers::Api::UrlaubController::type

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: