Gumbo_Interface_Record



Record Interface

This Interface is responsible for representing a database table record. It provides methods to retrieve record information as well as manipulating the data. The record can be saved, removed, or a new one created.

Author(s): Michael Luster <mluster79@yahoo.com>
License:New BSD License
Copyright:Copyright (c) 2007, iBayou, Michael Luster
Link:http://sourceforge.net/projects/phpgumbo
Version:0.0.1

Interface Methods

public void add ( string $column, [int $num] ) [line 148]

Adds (increments) to the current count columns value

Parameter(s):

  • (string) $column :: count column name
  • (int) $num :: increases by the supplied number
  • precondition:  _isColumnCount ($column)

[ Top ]
public string asXML ( [string $parent] ) [line 261]

Returns the object as an XML formatted string

Parameter(s):

  • (string) $parent :: parent element name

[ Top ]
public void create ( ) [line 124]

Creates a new record in the database

  • precondition:  !isLoaded ()
  • precondition:  isModified ()
  • precondition:  !isReadOnly

[ Top ]
public void decrement ( string $column, [int $num], [bool $allow_negative] ) [line 172]

Wrapper to sub() method

Parameter(s):

  • (string) $column :: count column name
  • (int) $num :: decreases by the supplied number
  • (bool) $allow_negative :: allows negative values

[ Top ]
public mixed get ( string $column ) [line 200]

Returns the value of a column

Parameter(s):

  • (string) $column :: Column Name

[ Top ]
public array getAllColumns ( ) [line 213]

Returns the entire Columns array


[ Top ]
public array getAllColumnsCount ( ) [line 234]

Returns all the count columns


[ Top ]
public array getAllColumnsExtra ( ) [line 227]

Returns all the extra columns array


[ Top ]
public array getAllColumnsMod ( ) [line 220]

Returns all modified table columns array


[ Top ]
public string getPrimaryKey ( ) [line 187]

Returns the primary key name


[ Top ]
public mixed getPrimaryValue ( ) [line 193]

Returns the primary key value


[ Top ]
public string getTable ( ) [line 181]

Returns the table name


[ Top ]
public string getXMLParent ( ) [line 206]

Returns the XML parent element name


[ Top ]
public void increment ( string $column, [int $num] ) [line 155]

Wrapper to add() method

Parameter(s):

  • (string) $column :: count column name
  • (int) $num :: increases by the supplied number

[ Top ]
public bool isLoaded ( ) [line 242]

Returns if the records was loaded


[ Top ]
public bool isModified ( ) [line 248]

Returns if the record was modified


[ Top ]
public bool isReadOnly ( ) [line 254]

Returns if the record accesses the database


[ Top ]
public void kill ( ) [line 108]

Removes the record from the database

  • precondition:  !isReadOnly ()
  • precondition:  isLoaded ()

[ Top ]
public void load ( ) [line 85]

Loads the record into memory


[ Top ]
public void loadXML ( string $xml, [string $parent] ) [line 93]

Loads an XML string, but only the first level of the parent

Parameter(s):

  • (string) $xml
  • (string) $parent :: name of top level XML element

[ Top ]
public void reset ( ) [line 131]

Resets the object by removing the values from the modified array


[ Top ]
public void save ( ) [line 116]

Saves a modified record to the database

  • precondition:  isLoaded ()
  • precondition:  isModified ()
  • precondition:  !isReadOnly ()

[ Top ]
public void setReadOnly ( bool $val ) [line 140]

Sets the object as read only

Parameter(s):

  • (bool) $val

[ Top ]
public void sub ( string $column, [int $num], [bool $allow_negative] ) [line 164]

Subtracts (decrement) one from the count column value

Parameter(s):

  • (string) $column :: count column name
  • (int) $num :: decreases by the supplied number
  • (bool) $allow_negative :: allows negative values
  • precondition:  _isColumnCount ($column)

[ Top ]
public void unload ( [bool $erase_all] ) [line 99]

Clears the object values, leaves the columns structure

Parameter(s):

  • (bool) $erase_all :: clears extra values from memory

[ Top ]
public mixed __get ( string $column ) [line 68]

Returns the raw value of the column name

Parameter(s):

  • (string) $column

[ Top ]
public bool __isset ( string $column ) [line 75]

Returns if the Column is set

Parameter(s):

  • (string) $column

[ Top ]
public void __set ( string $column, mixed $val ) [line 55]

Sets the value of a table column

Parameter(s):

  • (string) $column
  • (mixed) $val

[ Top ]
public array __sleep ( ) [line 43]

Serialized method


[ Top ]
public void __unset ( string $column ) [line 61]

Unsets the value of the supplied table column

Parameter(s):

  • (string) $column

[ Top ]
public void __wakeup ( ) [line 48]

Unserialized method


[ Top ]