Tripal
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord Class Reference

Public Member Functions

 setBaseTable (string $value)
 
 getBaseTable ()
 
 setSchemaName (string $value)
 
 getSchemaName ()
 
 setValues (array $values)
 
 setValue (string $key, $value)
 
 getValues ()
 
 getValue (string $key, array $options=[])
 

Protected Attributes

string $base_table
 
string $schema_name
 
array $values
 

Detailed Description

Chado Buddy Record

Each chado record returned by a ChadoBuddy service will be in the form of an instance of this class.

Member Function Documentation

◆ getBaseTable()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::getBaseTable ( )

Returns the name of the base table.

Returns
string The base table name.

◆ getSchemaName()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::getSchemaName ( )

Returns the value of the schema name.

Returns
string The schema name.

◆ getValue()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::getValue ( string  $key,
array  $options = [] 
)

Retrieves one value from the values array,

Parameters
string$keyA key for the $values associative array.
array$optionsAssociative array of options. The only supported option is 'strict'. If the key does not exist and strict is TRUE, throw an exception. If FALSE, return NULL. Defaults to TRUE.
Returns
mixed The value corresponding to the key, or NULL if key is absent.
Exceptions
Drupal

tripal_chado\ChadoBuddy\Exceptions\ChadoBuddyException When the specified key is not present and strict is set to TRUE (default).

◆ getValues()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::getValues ( )

Returns the associative array of values looked up from a chado table record.

Returns
array The array of key value pairs.

◆ setBaseTable()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::setBaseTable ( string  $value)

Sets the value of the base table.

Parameters
string$valueThe table name to be stored.

◆ setSchemaName()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::setSchemaName ( string  $value)

Sets the value of the schema name.

Parameters
string$valueThe schema name to be stored.

◆ setValue()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::setValue ( string  $key,
  $value 
)

Adds or updates one value in the values array.

Parameters
string$keyA key for the $values associative array.
mixed$valueThe value to be stored.

◆ setValues()

Drupal\tripal_chado\ChadoBuddy\ChadoBuddyRecord::setValues ( array  $values)

Sets the associative array with values looked up from a chado table record.

Parameters
array$valuesAn associative array of key=>value pairs.

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