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 DatabaseInterface

Direct known implementers

Nethgui\System\SessionDatabase
Namespace: Nethgui\System
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at System/DatabaseInterface.php
Methods summary
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

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

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

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

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

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

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

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

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

Nethgui Framework API documentation generated by ApiGen