Controller.php

Code Hygiene Score: 100

Keine Issues gefunden.

Dependencies 10

Klassen 1

Verwendet von 48

Versionen 18

Code

<?php

declare(strict_types=1);

namespace Framework;

// @responsibility: Basis-Controller mit Trait-Komposition

use Framework\Http\CsrfTrait;
use Framework\Http\HtmxResponseTrait;
use Framework\Http\InputTrait;
use Framework\Http\ResponseTrait;
use Framework\Http\ViewTrait;

/**
 * Base controller using trait composition for better cohesion.
 *
 * Traits:
 * - CsrfTrait: CSRF token handling
 * - ResponseTrait: json(), text(), html(), download(), redirect(), notFound()
 * - HtmxResponseTrait: htmxAlert(), htmxSuccess(), htmxError(), htmxRedirect()
 * - ViewTrait: view(), partial(), flash(), consumeFlash()
 * - InputTrait: getInput(), getString(), getInt(), getPagination()
 */
abstract class Controller
{
    use CsrfTrait;
    use ResponseTrait;
    use HtmxResponseTrait;
    use ViewTrait;
    use InputTrait;
}
← Übersicht Graph