Skip to content

Function index

Generated from the installed releases listed below. Regenerate this snapshot after a release; function signatures and namespaces are read through PHP reflection. Functions marked @internal are excluded. Import helpers with use function in each PHP file, including templates. See Dependency Injection for services exposed through these helpers.

naf/framework

Version v0.2.2 · Core

Signature Namespace to import from
abort(int $statusCode = 404, string $message = ''): never Naf
app(): Naf\Core\App Naf
config(?string $key = null, mixed $default = null): mixed Naf
env(): string Naf
event(): Naf\Core\EventManager Naf
guard(): Naf\Support\Guard Naf
json(mixed $data, int $status = 200, array $headers = []): Psr\Http\Message\ResponseInterface Naf
log(): Psr\Log\LoggerInterface Naf
param(): Naf\Support\RequestParameter Naf
plugin(?string $name = null): Naf\Support\Plugin|array Naf
redirect(string $url, int $status = 302): Psr\Http\Message\ResponseInterface Naf
refresh(): Psr\Http\Message\ResponseInterface Naf
request(): Psr\Http\Message\ServerRequestInterface|Psr\Http\Message\RequestInterface Naf
response(mixed $content = '', int $status = 200, array $headers = []): Psr\Http\Message\ResponseInterface Naf
route(?string $name = null, array $params = []): Naf\Core\Route|string Naf

naf/auth

Version v0.2.0 · Authentication and permissions

Signature Namespace to import from
auth(): Naf\Auth\Auth Naf\Auth

naf/cli

Version v0.2.0 · Console commands

Signature Namespace to import from
command(): Naf\CLI\Support\CommandRegistry Naf\CLI

naf/client

Version v0.2.0 · HTTP client

Signature Namespace to import from
client(): Naf\Client\Core\Client Naf\Client

naf/database

Version v0.2.0 · Database

Signature Namespace to import from
database(): ?PDO Naf\Database

naf/form

Version v0.2.1 · Forms and validation

Signature Namespace to import from
csrf(): Naf\Form\Support\Csrf Naf\Form
error($field, Naf\Form\Core\Validator $validator): ?string Naf\Form
error_class($field, Naf\Form\Core\Validator $validator): string Naf\Form
has_error($field, Naf\Form\Core\Validator $validator): bool Naf\Form
is_post(): bool Naf\Form
memory(string $key, mixed $default = null): ?string Naf\Form
memory_checked(string $key, mixed $value = 'on'): string Naf\Form
memory_selected(string $key, mixed $expectedValue): string Naf\Form
validator(): Naf\Form\Core\Validator Naf\Form

naf/i18n

Version v0.2.0 · Translations

Signature Namespace to import from
lang(): ?string Naf\I18n
t(string $key, array $params = []): string Naf\I18n
translator(): Naf\I18n\Core\Translator Naf\I18n

naf/mail

Version v0.2.0 · Sending mail

Signature Namespace to import from
mail(): Naf\Mail\Models\Mail Naf\Mail
mailer(): Naf\Mail\Core\Mailer Naf\Mail

naf/mcp

Version v0.2.1 · MCP tools

Signature Namespace to import from
tokens(): Naf\MCP\Store\TokenStoreInterface Naf\MCP
tool(): Naf\MCP\Support\ToolRegistry Naf\MCP

naf/oauth-client

Version v0.2.1 · Signing in with a provider

Signature Namespace to import from
oauth(string $provider): Naf\OAuth\Client\Core\Flow Naf\OAuth\Client
oauth_button(string $provider, ?string $label = null, ?string $next = null): string Naf\OAuth\Client
oauth_token(string $provider): ?Naf\OAuth\Client\Token\ProviderToken Naf\OAuth\Client

naf/oauth-server

Version v0.2.1 · Being the provider

Signature Namespace to import from
token(): Naf\OAuth\Server\Core\TokenContext Naf\OAuth\Server

naf/orm

Version v0.2.0 · ORM and repositories

Signature Namespace to import from
em(): Naf\ORM\Core\EntityManager Naf\ORM
repo(string $repository): Naf\ORM\Repository\AbstractRepository Naf\ORM

naf/queue

Version v0.2.1 · Queues and workers

Signature Namespace to import from
queue(?string $channel = null): Naf\Queue\Core\Queue Naf\Queue

naf/schedule

Version v0.2.1 · Scheduled jobs

Signature Namespace to import from
scheduler(): Naf\Schedule\Core\Scheduler Naf\Schedule

naf/session

Version v0.2.0 · Sessions

Signature Namespace to import from
session(): Naf\Session\Core\Session Naf\Session

naf/view

Version v0.2.0 · Views and templates

Signature Namespace to import from
asset(): Naf\View\Core\Asset Naf\View
render(string $template, array $vars = []): Psr\Http\Message\ResponseInterface Naf\View
s(array|string|null $value): array|string|null Naf\View
view(string $tpl, array $vars = []): string Naf\View

48 public functions across 16 packages.