Koowa_Database
[ class tree: Koowa_Database ] [ index: Koowa_Database ] [ all elements ]

Class: KDatabaseRowsetTable

Source Location: /libraries/koowa/database/rowset/table.php

Class Overview

KObject
   |
   --KObjectSet
      |
      --KDatabaseRowsetAbstract
         |
         --KDatabaseRowsetTable

Table Rowset Class


Author(s):

Variables

Methods


Child classes:

KDatabaseRowsetDefault
Default Rowset Default

Inherited Variables

Inherited Methods

Class: KDatabaseRowsetAbstract

KDatabaseRowsetAbstract::__construct()
Constructor
KDatabaseRowsetAbstract::addData()
Add rows to the rowset
KDatabaseRowsetAbstract::delete()
Deletes all rows in the rowset from the database
KDatabaseRowsetAbstract::extract()
Removes a row from the rowset
KDatabaseRowsetAbstract::find()
Returns a KDatabaseRow
KDatabaseRowsetAbstract::getColumn()
Retrieve an array of column values
KDatabaseRowsetAbstract::getData()
Returns all data as an array.
KDatabaseRowsetAbstract::getIdentityColumn()
Gets the identity column of the rowset
KDatabaseRowsetAbstract::getRow()
Get an instance of a row object for this rowset
KDatabaseRowsetAbstract::insert()
Insert a row into the rowset
KDatabaseRowsetAbstract::isConnected()
Test the connected status of the rowset.
KDatabaseRowsetAbstract::reset()
Reset the rowset
KDatabaseRowsetAbstract::save()
Saves all rows in the rowset to the database
KDatabaseRowsetAbstract::setColumn()
Set the value of all the columns
KDatabaseRowsetAbstract::setData()
Set the rowset data based on a named array/hash
KDatabaseRowsetAbstract::toArray()
Return an associative array of the data.
KDatabaseRowsetAbstract::_initialize()
Initializes the options for the object
KDatabaseRowsetAbstract::__call()
Search the mixin method map and call the method or forward the call to each row for processing.

Class: KObjectSet

KObjectSet::__construct()
Constructor
KObjectSet::contains()
Checks if the set contains a specific object
KObjectSet::count()
Returns the number of elements in the collection.
KObjectSet::current()
Return the current element
KObjectSet::extract()
Removes an object from the set
KObjectSet::getIterator()
Defined by IteratorAggregate
KObjectSet::insert()
Inserts an object in the set
KObjectSet::key()
Return the key of the current element
KObjectSet::merge()
Merge-in another object set
KObjectSet::next()
Move forward to next element
KObjectSet::offsetExists()
Check if the object exists in the queue
KObjectSet::offsetGet()
Returns the object from the set
KObjectSet::offsetSet()
Store an object in the set
KObjectSet::offsetUnset()
Removes an object from the set
KObjectSet::rewind()
Rewind the Iterator to the first element
KObjectSet::serialize()
Return a string representation of the set
KObjectSet::toArray()
Return an associative array of the data.
KObjectSet::top()
Return the first object in the set
KObjectSet::unserialize()
Unserializes a set from its string representation
KObjectSet::valid()
Checks if current position is valid
KObjectSet::__clone()
Preform a deep clone of the object

Class: KObject

KObject::__construct()
Constructor
KObject::get()
Get the object properties
KObject::getHandle()
Get a handle for this object
KObject::getIdentifier()
Gets the service identifier.
KObject::getMethods()
Get a list of all the available methods
KObject::getService()
Get an instance of a class based on a class identifier only creating it if it does not exist yet.
KObject::inherits()
Checks if the object or one of it's mixin's inherits from a class.
KObject::mixin()
Mixin an object
KObject::set()
Set the object properties
KObject::_initialize()
Initializes the options for the object
KObject::__call()
Search the mixin method map and call the method or trigger an error
KObject::__clone()
Preform a deep clone of the object.

Class Details

[line 19]
Table Rowset Class



Tags:

author:  Johan Janssens <johan@nooku.org>
uses:  KMixinClass


[ Top ]


Class Variables

$_table =  false

[line 26]

Table object or identifier (com://APP/COMPONENT.table.NAME)



Tags:

access:  protected

Type:   string|object


[ Top ]



Class Methods


constructor __construct [line 34]

\KDatabaseRowsetTable __construct( [ $config = null])

Constructor



Tags:

access:  public


Overrides KDatabaseRowsetAbstract::__construct() (Constructor)

Parameters:

KConfig|null   $config   An optional KConfig object with configuration options

[ Top ]

method addData [line 146]

\KDatabaseRowsetAbstract addData( $data, [boole $new = true])

Add rows to the rowset



Tags:

see:  KDatabaseRowsetTable::__construct()
access:  public


Overrides KDatabaseRowsetAbstract::addData() (Add rows to the rowset)

Parameters:

array   $data   An associative array of row data to be inserted.
boole   $new   If TRUE, mark the row(s) as new (i.e. not in the database yet). Default TRUE

[ Top ]

method getRow [line 161]

\KDatabaseRowAbstract getRow( [ $options = array()])

Get an empty row



Tags:

access:  public


Overrides KDatabaseRowsetAbstract::getRow() (Get an instance of a row object for this rowset)

Parameters:

array   $options   An optional associative array of configuration settings.

[ Top ]

method getTable [line 74]

\KDatabaseTableAbstract getTable( )

Method to get a table object

Function catches KDatabaseTableExceptions that are thrown for tables that don't exist. If no table object can be created the function will return FALSE.




Tags:

access:  public


[ Top ]

method isConnected [line 133]

bool isConnected( )

Test the connected status of the row.



Tags:

return:  Returns TRUE if we have a reference to a live KDatabaseTableAbstract object.
access:  public


Overrides KDatabaseRowsetAbstract::isConnected() (Test the connected status of the rowset.)

[ Top ]

method setTable [line 104]

\KDatabaseRowsetAbstract setTable( mixed $table)

Method to set a table object attached to the rowset



Tags:

throws:  KDatabaseRowsetException If the identifier is not a table identifier
access:  public


Parameters:

mixed   $table   An object that implements KObjectServiceable, KServiceIdentifier object or valid identifier string

[ Top ]

method _initialize [line 57]

void _initialize( $config, KConfig $object)

Initializes the options for the object

Called from __construct() as a first step of object instantiation.




Tags:

access:  protected


Overrides KDatabaseRowsetAbstract::_initialize() (Initializes the options for the object)

Parameters:

KConfig   $object   An optional KConfig object with configuration options
KConfig   $config  

[ Top ]

method __call [line 183]

mixed __call( string $method, array $arguments)

Forward the call to each row

This functions overloads KDatabaseRowsetAbstract::__call and implements a just in time mixin strategy. Available table behaviors are only mixed when needed.




Tags:

return:  The result of the function
access:  public


Overrides KDatabaseRowsetAbstract::__call() (Search the mixin method map and call the method or forward the call to each row for processing.)

Parameters:

string   $method   The function name
array   $arguments   The function arguments

[ Top ]


Documentation generated on Tue, 21 May 2013 03:04:50 +0200 by phpDocumentor 1.4.3