Documentation

Access
in package

Access control annotation for controller methods.

Define access permissions for controller methods based on login state, user role, and request type.

Usage:

/**
 * @Access(allow_login=true, allow_logoff=false, allow_role="admin,user")
 *\/
public function dashboard() }
Tags
Annotation

Table of Contents

Properties

$allow_http  : bool
Allow access from HTTP requests.
$allow_login  : bool
Allow access for logged-in users.
$allow_logoff  : bool
Allow access for logged-off (guest) users.
$allow_role  : string
Allowed role names for logged-in users.

Properties

$allow_http

Allow access from HTTP requests.

public bool $allow_http = true

Set to false to restrict access to CLI only.

Set to true to allow HTTP access, false for CLI only.

$allow_login

Allow access for logged-in users.

public bool $allow_login = true

Set to true to allow, false to deny.

$allow_logoff

Allow access for logged-off (guest) users.

public bool $allow_logoff = true

Set to true to allow, false to deny.

$allow_role

Allowed role names for logged-in users.

public string $allow_role = ''

Multiple roles can be specified with comma separation (e.g., "admin,editor,user"). Empty string means all roles are allowed.

Comma-separated role names.


        
On this page

Search results