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

Class: Quinoa_Record

Source Location: /Quinoa/Record.php

Class Overview


Quinoa Record class.


Author(s):

Version:

  • 0.0.21 2007-09-23

Copyright:

  • 2007

Variables

Methods



Class Details

[line 48]
Quinoa Record class.

Quinoa Record class. Quinoa_Record is a abstraction of a record in a database table. It has a array of attributes and the value of the primary key is kept in a separated property. It can easily be converted to an array and be constructed on the fly for saving data into back to the database. PHP version 5.x Copyright (c) 2007, Freeconcept, Lda. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Freeconcept, Lda. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.




Tags:

since:  File available since Release 0.0.1
link:  http://www.quinoaframework.org
version:  0.0.21 2007-09-23
copyright:  2007
author:  Marcello Duarte <marcello.duarte@gmail.com>


[ Top ]


Class Variables

$_attributes =

[line 56]

An array of Quinoa_Attributes

An array of Quinoa_Attributes




Tags:

access:  protected

Type:   Quinoa_Attribute[]


[ Top ]

$_primary =

[line 63]

The value for the primary key of that record

The value for the primary key of that record




Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 71]

Quinoa_Record __construct( unknown_type $attributes, [unknown_type $primary = ""])

Constructs the Quinoa_Record object

Constructs the Quinoa_Record object




Tags:

access:  public


Parameters:

unknown_type   $attributes  
unknown_type   $primary  

[ Top ]

method getAttribute [line 93]

Quinoa_Attribute getAttribute( string $name)

Get a specific attribute given its name

Get a specific attribute given its name




Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method getAttributes [line 82]

Quinoa_Attribute[] getAttributes( )

attributes accessor

attributes accessor




Tags:

access:  public


[ Top ]

method getNames [line 138]

array getNames( )

Returns all the names of all the attributes in an array

Returns all the names of all the attributes in an array




Tags:

access:  public


[ Top ]

method getPrimary [line 118]

mixed getPrimary( )

primary accessor

primary accessor




Tags:

access:  public


[ Top ]

method setAttributes [line 108]

void setAttributes( unknown_type $attributes)

attributes mutator

attributes mutator




Tags:

access:  public


Parameters:

unknown_type   $attributes  

[ Top ]

method setPrimary [line 128]

void setPrimary( unknown_type $primary)

primary mutator

primary mutator




Tags:

access:  public


Parameters:

unknown_type   $primary  

[ Top ]

method toArray [line 152]

array toArray( )

Converts itself into an associative array

Converts itself into an associative array




Tags:

access:  public


[ Top ]


Documentation generated on Wed, 03 Oct 2007 14:25:54 +0100 by phpDocumentor 1.3.0RC3