FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Record Class Reference
Inheritance diagram for Record:
Thing

Public Member Functions

 __construct ($def, $table)
 
 load ($key)
 Load the record. More...
 
 save ()
 Save the record. More...
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Protected Member Functions

 _get ($key)
 
 _set ($key, $value)
 
 getColumns ()
 
 getDb ()
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Protected Attributes

 $_def = null
 
 $_table = null
 
 $_columns = null
 
 $_key = null
 
 $_record = []
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Additional Inherited Members

- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 

Detailed Description

Definition at line 5 of file Record.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $def,
  $table 
)

Definition at line 14 of file Record.php.

Member Function Documentation

◆ _get()

_get (   $key)
protected

Definition at line 57 of file Record.php.

◆ _set()

_set (   $key,
  $value 
)
protected

Definition at line 61 of file Record.php.

◆ getColumns()

getColumns ( )
protected

Definition at line 65 of file Record.php.

◆ getDb()

getDb ( )
protected

Definition at line 76 of file Record.php.

◆ load()

load (   $key)

Load the record.

Parameters
mixed$keyUnique identifier for this record, based on the primary key (array when multiple columns).
Returns
bool True when found.

Definition at line 23 of file Record.php.

◆ save()

save ( )

Save the record.

Returns
mixed Key on success (auto insert ID when applicable; array when multiple columns; false when no primary key).

Definition at line 45 of file Record.php.

Field Documentation

◆ $_columns

$_columns = null
protected

Definition at line 10 of file Record.php.

◆ $_def

$_def = null
protected

Definition at line 7 of file Record.php.

◆ $_key

$_key = null
protected

Definition at line 11 of file Record.php.

◆ $_record

$_record = []
protected

Definition at line 12 of file Record.php.

◆ $_table

$_table = null
protected

Definition at line 8 of file Record.php.


The documentation for this class was generated from the following file: