Class: PersonInsurance

Source Location: /class_insurance.php

Class Overview [line 488]

Core
   |
   --Insurance
      |
      --PersonInsurance

Personinsurance methods.

Author(s):

  • Elpidio Latorilla

Version:

  • beta 1.0.08

Copyright:

  • 2002,2003,2004 Elpidio Latorilla

Variables

Methods


Inherited Methods

Class: Insurance

Insurance::Insurance()
Constructor
Insurance::countAllActiveFirms()
Counts all active insurance firms.
Insurance::FirmIDExists()
Alias of Firm_exists()
Insurance::Firm_exists()
Checks if the insurance company exists in the database based on its firm id.
Insurance::getAllActiveFirmsInfo()
Gets all active insurance firms' information.
Insurance::getFirmInfo()
Gets the insurance company's complete information.
Insurance::getFirmName()
Gets the insurance company's name.
Insurance::getInsuranceClassInfoArray()
Gets the information of all insurance classes. Returns 2 dimensional array.
Insurance::getInsuranceClassInfoObject()
Gets the information of all insurance classes. Returns adodb record object.
Insurance::getLimitActiveFirmsInfo()
Similar to getAllActiveFirmsInfo() but returns limited rows.
Insurance::getUseFrequency()
Gets the usage frequency of an insurance company based on its firm id key.
Insurance::saveFirmInfoFromArray()
Inserts new insurance company's complete information in the database.
Insurance::searchActiveFirm()
Searches for all active firms based on the supplied search key.
Insurance::searchCountActiveFirm()
Searches similar to searchActiveFirm() but returns the resulting number of rows.
Insurance::searchLimitActiveFirm()
Searches similar to searchActiveFirm() but returns limited number of rows.
Insurance::setFirmID()
Sets the internal firm id buffer to the insurance company's id.
Insurance::updateFirmInfoFromArray()
Updates an insurance company's information in the database.
Insurance::updateUseFrequency()
Increases usage frequency of an insurance company.
Insurance::_internResolveFirmID()
Resolves the insurance company's id.
Insurance::_useInsurance()
Sets the core to point to the insurance table's name and field names.

Class: Core

Core::coreFieldNames()
Returns the core field names of the core table in an array.
Core::deleteDBCache()
Deletes data from the database cache based on the id key.
Core::FilesListArray()
Returns a list of filename within a path in array.
Core::getAllDataArray()
Returns all records with the all items from the table.
Core::getAllDataObject()
Returns all records with all items from the table.
Core::getAllItemsArray()
Similar to getAllItemsObject() method but returns the records in an associative array.
Core::getAllItemsObject()
Returns all records with the needed items from the table.
Core::getDBCache()
Gets temporary data from the database cache.
Core::getErrorMsg()
Feturns the value of error_msg, the internal error message.
Core::getLastQuery()
Returns the the last sql query string
Core::getResult()
Feturns the value of result
Core::insertDataFromArray()
Inserts data from an array (passed by reference) into a table.
Core::insertDataFromInternalArray()
Inserts data from the internal array previously filled with data by the setDataArray() method.
Core::isPreLoaded()
Returns the value of is_preloaded that is set by methods that preload large number of data.
Core::LastRecordCount()
Returns the value of rec_count
Core::saveDBCache()
Saves temporary data to a cache in database.
Core::setDataArray()
Points the core data array to the external array that holds the data to be stored.
Core::setRefArray()
Points the reference variable $ref_array to the field names' array.
Core::setSQL()
Sets the internal sql query variable to the sql query.
Core::setTable()
Sets the coretable variable to the name of the database table.
Core::setWhereCondition()
Sets the "where" condition in an update query used with the updateDataFromInternalArray() method.
Core::Transact()
Transaction routine, ADODB transaction. It internally uses the ADODB transaction routine.
Core::updateDataFromArray()
Updates a record with the data from an array (passed by reference) based on the primary key.
Core::updateDataFromInternalArray()
Updates a table using data from an internal array previously filled with data by the setDataArray() method.
Core::_prepSaveArray()
Filters the data array intended for saving, removing the key-value pairs that do not correspond to the table's field names.
Core::_RecordExists()
Checks if a certain database record exists based onthe supplied query condition.


Class Details

Personinsurance methods.

Note this class should be instantiated only after a "$db" adodb connector object has been established by an adodb instance

Tags:

[ Top ]


Class Variables

$pid =

[line 498]

PID number

Type: int

Overrides:

[ Top ]

$tb_person_insurance = 'care_person_insurance'

[line 493]

Table name for person's insurance data

Type: string

Overrides:

[ Top ]


Class Methods

PersonInsurance

PersonInsurance PersonInsurance( [int $pid = 0])

[line 503]

Constructor

Parameters:

  • int $pid - PID number

[ Top ]

getInsuranceClassInfo

mixed getInsuranceClassInfo( int $class_nr)

[line 618]

Gets insurance class's information based on the class number.

The returned array contains the data with the following index keys:

  • class_id = class id
  • name = class name

Tags:

  • return - array or boolean
  • access - public

Parameters:

  • int $class_nr - Class number

[ Top ]

getPersonInsuranceObject

mixed getPersonInsuranceObject( [int $pid = ''])

[line 584]

Gets person's insurance data based on his PID number.

The returned adodb record object contains rows of arrays. Each array contains the data with the following index keys:

  • insurance_item_nr = insurance record primar key number
  • insurance_type = insurance type
  • insurance_nr = insurance number
  • insurance_firm_id = firm id
  • insurance_class_nr = insurance class number

Tags:

  • return - adodb record object or boolean
  • access - public

Parameters:

  • int $pid - PID number

[ Top ]

insertDataFromArray

boolean insertDataFromArray( array &$array, mixed 1)

[line 553]

Inserts data from an array into a database table.

Overrides Core::insertDataFromArray() (Inserts data from an array (passed by reference) into a table.)

Parameters:

  • mixed 1 - interger or string
  • array &$array - Data to save. By reference.

[ Top ]

internResolvePID

void internResolvePID( int $pid)

[line 517]

Resolves the PID number to be used.

Parameters:

  • int $pid - PID number

[ Top ]

setPID

void setPID( int $pid)

[line 510]

Sets the internal PID number buffer

Parameters:

  • int $pid - PID number

[ Top ]

updateDataFromArray

boolean updateDataFromArray( array &$array, [mixed $item_nr = ''])

[line 534]

Updates a database table record with data from an array.

Overrides Core::updateDataFromArray() (Updates a record with the data from an array (passed by reference) based on the primary key.)

Parameters:

  • array &$array - Data to save. By reference.
  • mixed $item_nr - interger or string

[ Top ]


Documentation generated on Sun, 16 Nov 2003 01:02:48 +0100 by phpDocumentor 1.2.3