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

Class: DAO

Source Location: /core/DAO.php

Class Overview


Provides a database abstraction of a Row, simplyfing data access and modification


Author(s):

Variables

Methods



Class Details

[line 15]
Provides a database abstraction of a Row, simplyfing data access and modification



Tags:

todo:  tests!!!


[ Top ]


Class Variables

$_assert_message =  "Class Instance isn't Loaded"

[line 35]

When the class isn't loaded, an Exception is thrown with this message



Tags:

access:  protected

Type:   string


[ Top ]

$_data = array()

[line 21]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_DbConnection =  null

[line 29]

Holds the DbConnection



Tags:

access:  protected

Type:   DbConnection


[ Top ]

$_id =  0

[line 20]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_idField =  ''

[line 19]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_loaded =  false

[line 22]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_tableName =  ''

[line 18]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 43]

DataAccessObject __construct( $tableName, string $id, string $table_name)

Creates DataAccessObject Instance



Tags:

access:  public


Parameters:

string   $table_name  
string   $id  
   $tableName  

[ Top ]

method assertLoaded [line 215]

boolean assertLoaded( )

Asserts that the DataAccessObject is Loaded



Tags:

access:  protected


[ Top ]

method delete [line 191]

boolean delete( )

Deletes the row on the database, if it violates referential-integrity as defined at database level it will simply return false constraints.



Tags:

access:  public


[ Top ]

method getAllData [line 112]

array getAllData( )

Returns all the data of the row in a convenient array



Tags:

access:  public


[ Top ]

method getId [line 126]

void getId( )



Tags:

access:  public


[ Top ]

method getStructure [line 121]

array getStructure( )

Gets Database Structure as returned by MySQL



Tags:

access:  public


[ Top ]

method isLoaded [line 206]

boolean isLoaded( )

Returns if the class instance is loaded



Tags:

access:  public


[ Top ]

method load [line 63]

boolean load( )

Loads the data from the database, remember to load before do anything.



Tags:

access:  public


[ Top ]

method save [line 139]

boolean save( )

Saves the data into the database, checking whether is a new row or an old

one that just needs an update




Tags:

access:  public


[ Top ]

method setIdField [line 130]

void setIdField( $field)



Tags:

access:  public


Parameters:

   $field  

[ Top ]

method __get [line 94]

string __get( string $field)

Getter



Tags:

access:  public


Parameters:

string   $field  

[ Top ]

method __isset [line 104]

boolean __isset( string $field)

Checks if the given index is setted



Tags:

access:  public


Parameters:

string   $field  

[ Top ]

method __set [line 84]

NULL __set( string $field, string $value)

Setter



Tags:

access:  public


Parameters:

string   $field  
string   $value  

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:33:01 -0500 by phpDocumentor 1.4.3