Sgss_Collection_Table_Interface 
Provides for two-dimensional collection with rows and columns

Description

Author:
Matsuda Shota
Copyright:
(c) 2007-2008 Matsuda Shota
License:
http://creativecommons.org/licenses/GPL/2.0/
Located in:
/Collection/Table/Interface.php (line 40)

Class overview

Methods

boolean clearRows ()

Removes all the rows in this table

Sgss_Collection_TableRow_Interface|null createRow (mixed $row)

Creates and returns the row object associated with the specified identifier, which is prepared to be inserted into this table

Sgss_Collection_TableRow_Interface getRow (mixed $row)

Returns the retrieved or prepared row object associated with the specified identifier in this table

int getRowCount ()

Returns the number of rows in this table

boolean hasAllRows (array|object $t)

Determines this table has all the rows associated with the identifiers inside the specified object

boolean hasRow (mixed $row)

Determines this table contains the row associated with the specified identifier

boolean isRowEmpty ()

Determines whether this table contains no rows

boolean removeAllRows (array|object $t)

Removes all the rows associated with the identifiers inside the specified object from this table

boolean removeRow (mixed $row)

Removes the row associated with the specified identifier from this table

Sgss_Collection_TableRow_Interface|null retrieveRow (mixed $row)

Retrieves and returns the row object associated with the specified identifier in this table

array toArray ()

Converts this table to an associated array

array toColumnArray ()

Returns an array containing all the column names in this table

array toRowArray ()

Returns an array containing all the keys associated with the rows in this table

mixed __get (mixed $name)
boolean __isset (mixed $name)
void __unset (mixed $name)

Method detail

clearRows

Removes all the rows in this table

Returns:
boolean -- True when the operation changed this table
Signature:
public boolean clearRows ()


createRow

Creates and returns the row object associated with the specified identifier, which is prepared to be inserted into this table

Parameters:
  • mixed $row

    Identifier to be associated with the prepared row

Returns:
Sgss_Collection_TableRow_Interface|null -- Prepared row object associated with the identifier, or null if this table already contains the identifier
Used by:
Sgss_Collection_Table_Abstract::getRow()
Signature:
public Sgss_Collection_TableRow_Interface|null createRow (mixed $row)


getRow

Returns the retrieved or prepared row object associated with the specified identifier in this table

Parameters:
  • mixed $row

    Identifier with which the row is associated

Returns:
Sgss_Collection_TableRow_Interface -- Row object associated with the identifier
Used by:
Sgss_Collection_Table_Abstract::offsetGet(), Sgss_Collection_Table_Abstract::__get()
Signature:
public Sgss_Collection_TableRow_Interface getRow (mixed $row)


getRowCount

Returns the number of rows in this table

Returns:
int -- The number of rows in this table
Used by:
Sgss_Collection_Table_Abstract::count(), Sgss_Collection_Table_Abstract::isRowEmpty()
Signature:
public int getRowCount ()


hasAllRows

Determines this table has all the rows associated with the identifiers inside the specified object

Parameters:
  • array|object $t

    Object containing identifiers with which the rows to determine are associated

Returns:
boolean -- True when this table contains all the rows associated with the identifiers in the object
Signature:
public boolean hasAllRows (array|object $t)


hasRow

Determines this table contains the row associated with the specified identifier

Parameters:
  • mixed $row

    Identifier with which the row to determine is associated

Returns:
boolean -- True when this table contains the row associated with the identifier
Used by:
Sgss_Collection_Table_Abstract::offsetExists(), Sgss_Collection_Table_Abstract::__isset(), Sgss_Collection_Table_Abstract::hasAllRows(), Sgss_Collection_Table_Abstract::getRow()
Signature:
public boolean hasRow (mixed $row)


isRowEmpty

Determines whether this table contains no rows

Returns:
boolean -- True when this table contains no rows
Signature:
public boolean isRowEmpty ()


removeAllRows

Removes all the rows associated with the identifiers inside the specified object from this table

Parameters:
  • array|object $t

    Object containing identifiers with which the rows to be removed are associated

Returns:
boolean -- True when the operation changed this table
Signature:
public boolean removeAllRows (array|object $t)


removeRow

Removes the row associated with the specified identifier from this table

Parameters:
  • mixed $row

    Identifier with which the row to be removed is associated

Returns:
boolean -- True when the operation changed this table
Used by:
Sgss_Collection_Table_Abstract::offsetUnset(), Sgss_Collection_Table_Abstract::removeAllRows(), Sgss_Collection_Table_Abstract::__unset()
Signature:
public boolean removeRow (mixed $row)


retrieveRow

Retrieves and returns the row object associated with the specified identifier in this table

Parameters:
  • mixed $row

    Identifier with which the row is associated

Returns:
Sgss_Collection_TableRow_Interface|null -- Row object associated with the identifier, or null if this table does not contain the identifier
Used by:
Sgss_Collection_Table_Abstract::getRow()
Signature:
public Sgss_Collection_TableRow_Interface|null retrieveRow (mixed $row)


toArray

Converts this table to an associated array

Returns:
array -- Associated array representing this table
Signature:
public array toArray ()


toColumnArray

Returns an array containing all the column names in this table

Returns:
array -- Array containing all the column names in this table
Signature:
public array toColumnArray ()


toRowArray

Returns an array containing all the keys associated with the rows in this table

Returns:
array -- Array containing all the keys associated with the rows in this table
Signature:
public array toRowArray ()


__get

Parameters:
  • mixed $name
Signature:
public mixed __get (mixed $name)


__isset

Parameters:
  • mixed $name
Signature:
public boolean __isset (mixed $name)


__unset

Parameters:
  • mixed $name
Signature:
public void __unset (mixed $name)