Soong
Soong provides a general-purpose ETL library for data migration.
BasicRecord Class Reference

Basic implementation of data records as arrays. More...

Inheritance diagram for BasicRecord:
Record

Public Member Functions

 __construct ($data=[])
 Create a record populated with a set of named data properties. More...
 
 setPropertyValue (string $propertyName, $propertyValue)
 Set a property from an existing Property object.
Parameters
string$propertyNameName of the property to set.
mixed$propertyValueProperty value to set.
More...
 
 getPropertyValue (string $propertyName)
 Retrieve a property value as a Property.
Parameters
string$propertyNameName of the property to get.
Returns
mixed Value of the property.
More...
 
 toArray ()
 Fetch the list of named properties as an associative array.
Returns
array Associative array of property values, keyed by property name.
More...
 
 propertyExists (string $propertyName)
 Does the named property exist in this record?
Parameters
string$propertyNameName of the property to get.
Returns
bool TRUE if the property exists (even if its value is NULL), FALSE otherwise.
More...
 

Detailed Description

Basic implementation of data records as arrays.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $data = [])

Create a record populated with a set of named data properties.

Parameters
array$dataAssociative array of property values, keyed by property name.

Member Function Documentation

◆ setPropertyValue()

setPropertyValue ( string  $propertyName,
  $propertyValue 
)

Set a property from an existing Property object.

Parameters
string$propertyNameName of the property to set.
mixed$propertyValueProperty value to set.

Implements Record.

Referenced by BasicRecord\__construct().

◆ getPropertyValue()

getPropertyValue ( string  $propertyName)

Retrieve a property value as a Property.

Parameters
string$propertyNameName of the property to get.
Returns
mixed Value of the property.

Implements Record.

◆ toArray()

toArray ( )

Fetch the list of named properties as an associative array.

Returns
array Associative array of property values, keyed by property name.

Implements Record.

◆ propertyExists()

propertyExists ( string  $propertyName)

Does the named property exist in this record?

Parameters
string$propertyNameName of the property to get.
Returns
bool TRUE if the property exists (even if its value is NULL), FALSE otherwise.

Implements Record.