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

Class NethPlatform

Implementation of the platform interface for Nethesis products

Nethgui\System\NethPlatform implements Nethgui\System\PlatformInterface, Nethgui\Authorization\PolicyEnforcementPointInterface, Nethgui\Log\LogConsumerInterface, Nethgui\Utility\PhpConsumerInterface, Nethgui\Utility\SessionConsumerInterface, Nethgui\Component\DependencyConsumer
Namespace: Nethgui\System
Located at System/NethPlatform.php
Methods summary
public
# __construct( Nethgui\Authorization\UserInterface $user, Nethgui\Model\SystemTasks $systemTasks )

Parameters

$user
$systemTasks
public SessionConsumerInterface
# setSession( Nethgui\Utility\SessionInterface $session )

Returns

SessionConsumerInterface
The object itself

Implementation of

Nethgui\Utility\SessionConsumerInterface::setSession()
public EsmithDatabase
# getDatabase( string $database )

Parameters

$database
SME database configuration name

Returns

EsmithDatabase

Implementation of

Nethgui\System\PlatformInterface::getDatabase()
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\NethPlatform::getMapAdapter()

Api

Implementation of

Nethgui\System\PlatformInterface::getIdentityAdapter()
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\NethPlatform::getIdentityAdapter()
Nethgui\Adapter\AdapterAggregationInterface

Api

Implementation of

Nethgui\System\PlatformInterface::getMapAdapter()
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

Implementation of

Nethgui\System\PlatformInterface::getTableAdapter()
public Nethgui\System\ProcessInterface
# signalEvent( string $eventSpecification, 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

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

Returns

Nethgui\System\ProcessInterface

See

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

Api

Implementation of

Nethgui\System\PlatformInterface::signalEvent()
public
# setDetachedProcessCondition( $condition, $values )
public
# runEvents( string $queueName )

Run enqueued events

Run enqueued events

Parameters

$queueName

Implementation of

Nethgui\System\PlatformInterface::runEvents()
public Nethgui\Authorization\PolicyEnforcementPointInterface
# setPolicyDecisionPoint( Nethgui\Authorization\PolicyDecisionPointInterface $pdp )

Interface implementor will receive the PDP object through this setter

Interface implementor will receive the PDP object through this setter

Parameters

$pdp

Returns

Nethgui\Authorization\PolicyEnforcementPointInterface

Api

Implementation of

Nethgui\Authorization\PolicyEnforcementPointInterface::setPolicyDecisionPoint()
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

Implementation of

Nethgui\System\PlatformInterface::exec()
public Nethgui\Log\LogInterface
# getLog( )

The log attached to the interface implementor

The log attached to the interface implementor

Returns

Nethgui\Log\LogInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::getLog()
public Nethgui\Log\LogConsumerInterface
# setLog( Nethgui\Log\LogInterface $log )

Change the log attached to the interface implementor

Change the log attached to the interface implementor

Parameters

$log

Returns

Nethgui\Log\LogConsumerInterface

Api

Implementation of

Nethgui\Log\LogConsumerInterface::setLog()
public string
# getDateFormat( )

Get the system internal date format

Get the system internal date format

Returns

string

Implementation of

Nethgui\System\PlatformInterface::getDateFormat()
public Nethgui\Utility\PhpConsumerInterface
# setPhpWrapper( Nethgui\Utility\PhpWrapper $object )

Parameters

$object

Returns

Nethgui\Utility\PhpConsumerInterface

Implementation of

Nethgui\Utility\PhpConsumerInterface::setPhpWrapper()
public array
# getDetachedProcesses( )

Deprecated

since version 1.6

Returns

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

See

Nethgui\System\ProcessInterface

Implementation of

Nethgui\System\PlatformInterface::getDetachedProcesses()
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

Implementation of

Nethgui\System\PlatformInterface::getDetachedProcess()
public Nethgui\System\Validator
# createValidator( )

Creates a Validator object that checks against each of the function arguemnts

Creates a Validator object that checks against each of the function arguemnts

Returns

Nethgui\System\Validator

Implementation of

Nethgui\System\PlatformInterface::createValidator()
public
# setRequest( Nethgui\Controller\Request $request )
public
# setUserNotifications( Nethgui\Model\UserNotifications $notifications )
public array
# getDependencySetters( )

The returned hash is indexed by the model class name and has a callable objects as value. Each callable is invoked with the model instance as only argument.

The returned hash is indexed by the model class name and has a callable objects as value. Each callable is invoked with the model instance as only argument.

Returns

array

Implementation of

Nethgui\Component\DependencyConsumer::getDependencySetters()
Constants inherited from Nethgui\System\PlatformInterface
ANYTHING, ANYTHING_COLLECTION, BOOLEAN, CIDR_BLOCK, DATE, EMAIL, EMPTYSTRING, HOSTADDRESS, HOSTNAME, HOSTNAME_FQDN, HOSTNAME_SIMPLE, IP, IP_OR_EMPTY, IPv4, IPv4_NETMASK, IPv4_NETMASK_OR_EMPTY, IPv4_OR_EMPTY, MACADDRESS, NETMASK, NETMASK_OR_EMPTY, NONNEGATIVE_INTEGER, NOTEMPTY, PORTNUMBER, POSITIVE_INTEGER, SERVICESTATUS, TIME, USERNAME, USERNAME_COLLECTION, YES_NO
Nethgui Framework API documentation generated by ApiGen