Overview

Namespaces

  • Nethgui
    • Adapter
    • Authorization
    • Component
    • Controller
      • Collection
      • Table
    • Exception
    • Log
    • Model
    • Module
      • Help
      • Notification
    • Renderer
    • Serializer
    • System
    • Test
      • Tool
      • Unit
        • Nethgui
          • Adapter
            • ParameterSet
          • Authorization
          • Log
          • Module
            • Notification
          • Renderer
          • Serializer
          • System
          • Utility
          • View
        • Test
          • Tool
    • Utility
    • View
    • Widget
      • Xhtml
  • None
  • Test
    • Tool

Classes

  • AlwaysFailValidator
  • CallbackValidator
  • NethPlatform
  • Process
  • SessionDatabase
  • Validator

Interfaces

  • DatabaseInterface
  • MandatoryValidatorInterface
  • PlatformConsumerInterface
  • PlatformInterface
  • ProcessInterface
  • ValidatorInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Interface PlatformInterface

Interface to the underlying platform

Direct known implementers

Nethgui\System\NethPlatform
Namespace: Nethgui\System
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at System/PlatformInterface.php
Methods summary
public Nethgui\System\DatabaseInterface
# getDatabase( $database )

Returns

Nethgui\System\DatabaseInterface

Api

Var

string
public Nethgui\Adapter\AdapterInterface
# getIdentityAdapter( string|ArrayAccess $database, string $key, string $prop = NULL, string $separator = NULL )

Get an adapter for a "key" or "prop".

Get an adapter for a "key" or "prop".

An Identity Adapter is associated with a database value stored in a key or prop value. If a $separator character is specified, the adapter is enhanced with an ArrayAccess interface, and the value is stored joining its elements with that $separator.

Parameters

$database
Database name or ArrayAccess object
$key
Key connected to the adapter.
$prop
Optional - Set to a prop name to connect a prop instead of a key.
$separator
Optional - Specify a single character string to obtain an ArrayAccess and \Countable interface.

Returns

Nethgui\Adapter\AdapterInterface

See

Nethgui\Adapter\AdapterAggregationInterface
Nethgui\System\PlatformInterface::getMapAdapter()

Api

public Nethgui\Adapter\AdapterInterface
# getMapAdapter( callable $readCallback, callable $writeCallback, array $args )

Get a mapping Adapter.

Get a mapping Adapter.

A Map Adapter maps database values through a "reader" and a "writer" converter method. Values are specified through $args parameter.

Parameters

$readCallback
If $args has N elements $readCallback must accept N parameters and return a value.
$writeCallback
If $args has N elements $writeCallback must accept a parameter and return an array of N elements.
$args
An array of arrays in the form ($database, $key, $prop). $prop is optional.

Returns

Nethgui\Adapter\AdapterInterface

See

Nethgui\System\PlatformInterface::getIdentityAdapter()
Nethgui\Adapter\AdapterAggregationInterface

Api

public Nethgui\Adapter\AdapterInterface
# getTableAdapter( string $database, string $typeOrKey, string $filterOrProp = NULL, array $separators = NULL )

Get a table adapter

Get a table adapter

A table adapter has an array interface, where each element represents a row, and each row is an array itself.

Parameters

$database
Database name
$typeOrKey
The type of the keys to read from database or the key value where the data is stored
$filterOrProp
The string to filter the table data or set to a prop name to connect a prop instead of a key.
$separators
An array of one or two separator strings. The first is for the rows, the second for the columns. Set to NULL if $typeOrKey is a TYPE!

Returns

Nethgui\Adapter\AdapterInterface
An adapter with array and countable interfaces.

Api

public Nethgui\System\ProcessInterface
# signalEvent( string $event, array $arguments = array() )

Run an event handler

Run an event handler

The event can be signaled immediately or added to a queue.

An event is represented by a ProcessInterface. If the event specification terminates with an ampersand (&) the process is detached.

Parameters

$event
Event specification [@][ &]
$arguments
Optional event arguments

Returns

Nethgui\System\ProcessInterface

See

Nethgui\System\PlatformInterface::runEvents()
Nethgui\System\PlatformInterface::exec()

Api

public
# runEvents( string $queueName )

Run events on the give queue

Run events on the give queue

Parameters

$queueName
public Nethgui\System\ProcessInterface
# exec( string $command, array $arguments = array(), boolean $detached = FALSE )

PHP exec() wrapper

PHP exec() wrapper

The arguments are replaced in the command string, searching for placeholders in the form ${1} .. ${N}.

NOTE: Only placeholders corresponding to i+1 element in the arguments array are replaced.

Parameters

$command
$arguments
Arguments for the command. Will be shell-escaped.
$detached
If set the command is run detached from the PHP system process and traced

Returns

Nethgui\System\ProcessInterface

Api

public Nethgui\System\ValidatorInterface
# createValidator( )

Create a platform validator object

Create a platform validator object

Returns

Nethgui\System\ValidatorInterface

Api

public string
# getDateFormat( )

Get the system internal date format

Get the system internal date format

Returns

string
public array
# getDetachedProcesses( )

Deprecated

since version 1.6

Returns

array
An array of \Nethgui\System\ProcessInterface traced objects

See

Nethgui\System\ProcessInterface
public Nethgui\System\ProcessInterface
# getDetachedProcess( string $identifier )

Deprecated

since version 1.6

Parameters

$identifier
$name The identifier of the process

Returns

Nethgui\System\ProcessInterface

Api

Constants summary
integer SERVICESTATUS

A valid service status is a 'disabled' or 'enabled' string.

A valid service status is a 'disabled' or 'enabled' string.

Api

# 1248968160
integer USERNAME

A valid *nix username token

A valid *nix username token

Api

# 1248968161
integer NOTEMPTY

A not empty value

A not empty value

Api

# 1248968162
integer ANYTHING

Accepts any value

Accepts any value

Api

# 1248968163
integer ANYTHING_COLLECTION

Accept a value that represents a collection of any thing

Accept a value that represents a collection of any thing

Api

# 1248968164
integer USERNAME_COLLECTION

Accept a value that represents a collection of any Unix usernames

Accept a value that represents a collection of any Unix usernames

Api

# 1248968165
integer POSITIVE_INTEGER

Accept positive integer

Accept positive integer

Api

# 1248968166
integer NONNEGATIVE_INTEGER

Accept a non-negative integer, an integer greater than or equal to zero

Accept a non-negative integer, an integer greater than or equal to zero

Api

# 1366805296
integer HOSTNAME

Valid generic hostname

Valid generic hostname

See

478


Api

# 1248968167
integer HOSTNAME_SIMPLE

Valid simple hostname without domain part

Valid simple hostname without domain part

See

1052


Api

# 1334736972
integer HOSTNAME_FQDN

Valid hostname with domain part (FQDN)

Valid hostname with domain part (FQDN)

See

1052


Api

# 1334741642
integer HOSTADDRESS

Valid host name or ip address

Valid host name or ip address

See

478


Api

# 1248968168
integer DATE

Valid date

Valid date

See

513


Api

# 1248968169
integer TIME

Valid time

Valid time

See

513


Api

# 1248968170
integer BOOLEAN

Boolean validator.

Boolean validator.

Api

'', '0', FALSE are FALSE boolean values. Other values are TRUE.
# 1248968171
integer IPv4

A valid IPv4 address like '192.168.1.1'

A valid IPv4 address like '192.168.1.1'

Api

# 1248968172
integer IPv4_OR_EMPTY

A valid IPv4 address like '192.168.1.1' ore empty

A valid IPv4 address like '192.168.1.1' ore empty

Api

# 1248968173
integer NETMASK_OR_EMPTY

A valid netmask address like '255.255.255.0' ore empty

A valid netmask address like '255.255.255.0' ore empty

Api

# 1365512893
integer IP

Alias for VALID_IPv4

Alias for VALID_IPv4

Api

# 1248968174
integer IP_OR_EMPTY

Alias for VALID_IPv4_OR_EMPTY

Alias for VALID_IPv4_OR_EMPTY

Api

# 1248968175
integer IPv4_NETMASK_OR_EMPTY

Alias for NETMASK_OR_EMPTY

Alias for NETMASK_OR_EMPTY

Api

# 1365513038
integer PORTNUMBER

A valid TCP/UDP port number 0-65535

A valid TCP/UDP port number 0-65535

Api

# 1248968176
integer YES_NO

A choice between 'yes' and 'no' values

A choice between 'yes' and 'no' values

Api

# 1248968177
integer IPv4_NETMASK

A valid ipv4 netmask address like '255.255.255.0'

A valid ipv4 netmask address like '255.255.255.0'

Api

# 1248968178
integer NETMASK

Alias for VALID_IPv4_NETMASK

Alias for VALID_IPv4_NETMASK

Api

# 1248968179
integer MACADDRESS

A valid mac address like 00:16:3E:78:7A:7B

A valid mac address like 00:16:3E:78:7A:7B

Api

# 1248968180
integer EMAIL

Valid email address

Valid email address

A restricted set of RFC5322 dot-atom form (sect 3.4.1)

Api

# 1340359603
integer EMPTYSTRING

An empty string

An empty string

This is useful to compose _OR_EMPTY rules

Api

# 1368694834
integer CIDR_BLOCK

CIDR block validator

CIDR block validator

Eg 192.144.33.0/24

Api

# 1402048238
Nethgui Framework API documentation generated by ApiGen