Class Person
Base class for People classes.
-
CI_Model
-
Person
Author:
N/A
Since:
1.0
Link:
github.com/jekkos/opensourcepos
Located at models/Person.php
Methods summary
public
boolean
|
#
exists( integer $person_id )
Determines whether the given person exists in the people database table
Determines whether the given person exists in the people database table
Parameters
- $person_id
- identifier of the person to verify the existence
Returns
boolean TRUE if the person exists, FALSE if not
|
public
array
|
#
get_all( integer $limit = 10000, integer $offset = 0 )
Gets all people from the database table
Gets all people from the database table
Parameters
- $limit
- limits the query return rows
- $offset
- offset the query
Returns
array array of people table rows
|
public
integer
|
#
get_total_rows( )
Gets total of rows of people database table
Gets total of rows of people database table
Returns
integer row counter
|
public
array
|
#
get_info( integer $person_id )
Gets information about a person as an array
Gets information about a person as an array
Parameters
- $person_id
- identifier of the person
Returns
array containing all the fields of the table row
|
public
array
|
#
get_multiple_info( array $person_ids )
Gets information about people as an array of rows
Gets information about people as an array of rows
Parameters
- $person_ids
- array of people identifiers
Returns
array containing all the fields of the table row
|
public
boolean
|
#
save( array & $person_data, var $person_id = FALSE )
Inserts or updates a person
Inserts or updates a person
Parameters
- $person_data
- array containing person information
- $person_id
- identifier of the person to update the information
Returns
boolean TRUE if the save was successful, FALSE if not
|
public
array
|
#
get_search_suggestions( string $search, integer $limit = 25 )
Get search suggestions to find person
Get search suggestions to find person
Parameters
- $search
- string containing the term to search in the people table
- $limit
- limit the search
Returns
array array with the suggestion strings
|
public
boolean
|
#
delete( integer $person_id )
Deletes one Person (dummy base function)
Deletes one Person (dummy base function)
Parameters
- $person_id
- person identificator
Returns
boolean always TRUE
|
public
boolean
|
#
delete_list( array $person_ids )
Deletes a list of people (dummy base function)
Deletes a list of people (dummy base function)
Parameters
- $person_ids
- list of person identificators
Returns
boolean always TRUE
|