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 SessionDatabase

Database with a Session persistent storage

Nethgui\System\SessionDatabase implements Nethgui\System\DatabaseInterface, Nethgui\Utility\SessionConsumerInterface
Namespace: Nethgui\System
Author: Davide Principi davide.principi@nethesis.it
Since: 1.4
Located at System/SessionDatabase.php
Methods summary
public
# __construct( )
public boolean
# delProp( string $key, array $props )

Delete one or more properties under the given key Act like: sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...

Delete one or more properties under the given key Act like: sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...

Parameters

$key
the property parent key
$props
a simple array containg the properties to be deleted

Returns

boolean
TRUE on success, FALSE otherwise

Api

Implementation of

Nethgui\System\DatabaseInterface::delProp()
public
# deleteKey( mixed $key )

Delete a key and all its properties Act like: /sbin/e-smith/db dbfile delete key

Delete a key and all its properties Act like: /sbin/e-smith/db dbfile delete key

Parameters

$key

Api

Implementation of

Nethgui\System\DatabaseInterface::deleteKey()
public array
# getAll( string $type = NULL )

Retrieve all keys from the database. If needed, you can filter the results by type.

Retrieve all keys from the database. If needed, you can filter the results by type.

Parameters

$type
(optional) type of the key

Returns

array
associative array in the form "[KeyName] => array( [type] => [TypeValue], [PropName1] => [PropValue1], [PropName2] => [PropValue2], ...)

Api

Implementation of

Nethgui\System\DatabaseInterface::getAll()
public array
# getKey( string $key )

Retrieve a key from the database. Act like : /sbin/e-smith/db dbfile get key

Retrieve a key from the database. Act like : /sbin/e-smith/db dbfile get key

Parameters

$key
the key to read

Returns

array
associative array in the form [PropName] => [PropValue]

Api

Implementation of

Nethgui\System\DatabaseInterface::getKey()
public string
# getProp( string $key, string $prop )

Read the value of the given property Act like: /sbin/e-smith/db dbfile getprop key prop

Read the value of the given property Act like: /sbin/e-smith/db dbfile getprop key prop

Parameters

$key
the parent property key
$prop
the name of the property

Returns

string
the value of the property

Api

Implementation of

Nethgui\System\DatabaseInterface::getProp()
public string
# getType( string $key )

Return the type of a key Act like: /sbin/e-smith/db dbfile gettype key

Return the type of a key Act like: /sbin/e-smith/db dbfile gettype key

Parameters

$key
the key to retrieve

Returns

string
the type of the key

Api

Implementation of

Nethgui\System\DatabaseInterface::getType()
public boolean
# setKey( string $key, string $type, string $props )

Set a database key with type and properties. Act like: /sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...

Set a database key with type and properties. Act like: /sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...

Parameters

$key
Key to write
$type
Type of the key
$props
Array of properties in the form [PropName] => [PropValue]

Returns

boolean
TRUE on success, FALSE otherwise

Api

Implementation of

Nethgui\System\DatabaseInterface::setKey()
public boolean
# setProp( string $key, array $props )

Set one or more properties under the given key

Set one or more properties under the given key

Act like: /sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...

Parameters

$key
the property parent key
$props
an associative array in the form [PropName] => [PropValue]

Returns

boolean
TRUE on success, FALSE otherwise

Api

Implementation of

Nethgui\System\DatabaseInterface::setProp()
public boolean
# setType( string $key, string $type )

Set the type of a key Act like: /sbin/e-smith/db dbfile settype key type

Set the type of a key Act like: /sbin/e-smith/db dbfile settype key type

Parameters

$key
the key to change
$type
the new type

Returns

boolean
true on success, FALSE otherwise

Api

Implementation of

Nethgui\System\DatabaseInterface::setType()
public SessionConsumerInterface
# setSession( Nethgui\Utility\SessionInterface $session )

Returns

SessionConsumerInterface
The object itself

Implementation of

Nethgui\Utility\SessionConsumerInterface::setSession()
Nethgui Framework API documentation generated by ApiGen