Oihana PHP Commands

ServerTrait

Provides server-related functionality for commands that rely on server configuration options.

Tags
author

Marc Alcaraz

since
1.0.0

Table of Contents

Properties

$serverOptions  : ServerOptions|null
The server options instance used by the command.

Methods

initializeServerOptions()  : static
Initializes the server options from a configuration array.

Properties

$serverOptions

The server options instance used by the command.

public ServerOptions|null $serverOptions = null

Server options object, or null if not initialized.

Methods

initializeServerOptions()

Initializes the server options from a configuration array.

protected initializeServerOptions([array<string|int, mixed> $init = [] ]) : static

If the array contains a ServerOptions::SERVER key, its value will be used to initialize the server options. Otherwise, the full array is passed.

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

Configuration data used to create the ServerOptions instance.

Return values
static

Returns the current instance for fluent chaining.


        
On this page

Search results