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

  • ArrayAdapter
  • LazyLoaderAdapter
  • MultipleAdapter
  • RecordAdapter
  • RecordKeyAdapter
  • ScalarAdapter
  • TableAdapter
  • TabularValueAdapter

Interfaces

  • AdapterAggregateInterface
  • AdapterAggregationInterface
  • AdapterInterface
  • ModifiableInterface
  • Overview
  • Namespace
  • Class
  • Deprecated

Class MultipleAdapter

A Multiple adapter maps a scalar value to multiple keys or props through a "reader" and a "writer" callback function.

The reader function is mandatory, the writer is optional. If you set to NULL the writer callback you get a read-only adapter, but save() still records the modified state.

NOTE: If the adapter has an empty set of serializers the reader function will still be called with no arguments.

Nethgui\Adapter\MultipleAdapter implements Nethgui\Adapter\AdapterInterface
Namespace: Nethgui\Adapter
Author: Davide Principi davide.principi@nethesis.it
Since: 1.0
Api
Located at Adapter/MultipleAdapter.php
Methods summary
public
# __construct( callable $readerCallback, callable $writerCallback = NULL, array $serializers = array() )

Parameters

$readerCallback
The reader PHP callback function: (p1, ..., pN) -> V
$writerCallback
The writer PHP callback function: V -> (p1, ..., pN)
$serializers
An array of \Nethgui\Serializer\SerializerInterface objects

See

\Nethgui\Serializer\SerializerInterface
public mixed
# get( )

Returns

mixed

Api

Implementation of

Nethgui\Adapter\AdapterInterface::get()
public
# set( $value )

Api

Var

mixed $value

Implementation of

Nethgui\Adapter\AdapterInterface::set()
public
# delete( )

Api

Implementation of

Nethgui\Adapter\AdapterInterface::delete()
public bool;
# isModified( )

Report if the object state has been changed from the last save()

Report if the object state has been changed from the last save()

Returns

bool;

Api

Implementation of

Nethgui\Adapter\ModifiableInterface::isModified()
public boolean
# save( )

Persist the object state

Persist the object state

Returns

boolean

See

Nethgui\Adapter\MultipleAdapter::isModified()

Api

Implementation of

Nethgui\Adapter\ModifiableInterface::save()
Nethgui Framework API documentation generated by ApiGen