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 TableAdapter

Table adapter provide an array like access to all database keys of a given type

Nethgui\Adapter\TableAdapter implements Nethgui\Adapter\AdapterInterface, ArrayAccess, IteratorAggregate, Countable
Namespace: Nethgui\Adapter
Located at Adapter/TableAdapter.php
Methods summary
public
# __construct( Nethgui\System\DatabaseInterface $db, mixed $types = NULL, mixed $filter = NULL )

The $filter argument can be - NULL, no filter is applied - an array in the form ('prop1'=>'val1',...,'propN'=>'valN') where valN it's a regexp. In this case, the adapter will return only rows where all props match all associated regexp. - a callable, filter is invoked on each row and must return a TRUE/FALSE value that determines if a record is accepted (TRUE) or not (FALSE). The filter prototype is (bool) filter($row) {};

Parameters

$db
used for table mapping
$types
The types of records to load. Can be a string or an array or NULL.
$filter
Can be NULL, an associative array, or callable c($key, $props) returning TRUE/FALSE value.

Throws

InvalidArgumentException
public
# count( )

Implementation of

Countable::count()
public
# delete( )

Api

Implementation of

Nethgui\Adapter\AdapterInterface::delete()
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 boolean
# save( )

Persist the object state

Persist the object state

Returns

boolean

See

Nethgui\Adapter\TableAdapter::isModified()

Api

Implementation of

Nethgui\Adapter\ModifiableInterface::save()
public
# getIterator( )

Implementation of

IteratorAggregate::getIterator()
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
# offsetExists( $offset )

Implementation of

ArrayAccess::offsetExists()
public
# offsetGet( $offset )

Implementation of

ArrayAccess::offsetGet()
public
# offsetSet( $offset, $value )

Implementation of

ArrayAccess::offsetSet()
public
# offsetUnset( $offset )

Implementation of

ArrayAccess::offsetUnset()
public
# flush( )
Nethgui Framework API documentation generated by ApiGen