PHP Class Kimai_Remote_Database

This was implemented due to the bad maintainability of MySQL and PDO Classes. This class serves as a bridge and currently ONLY for API calls.
Author: Kevin Papst
Author: Alexander Bauer
Mostrar archivo Open project: kimai/kimai

Public Methods

Method Description
__call ( $fnName, $arguments ) : mixed
__construct ( array $kga, Kimai_Database_Mysql $database ) Kimai_Remote_Database constructor.
expense_create ( array $data ) : integer create exp entry
expense_delete ( integer $id ) : object delete exp entry
expense_edit ( integer $id, array $data ) : object edit exp entry
expense_get ( integer $expId ) : array Returns the data of a certain expense record
get_expense ( integer $id ) : array returns single expense entry as array
get_expenses ( integer $start, integer $end, integer $users = null, $customers = null, $projects = null, $reverse_order = false, $filter_refundable, integer $filterCleared = null, $startRows, $limitRows, $countOnly = false ) : array returns expenses for specific user as multidimensional array

Method Details

__call() public method

public __call ( $fnName, $arguments ) : mixed
$fnName
$arguments
return mixed

__construct() public method

Kimai_Remote_Database constructor.
public __construct ( array $kga, Kimai_Database_Mysql $database )
$kga array
$database Kimai_Database_Mysql

expense_create() public method

create exp entry
public expense_create ( array $data ) : integer
$data array
return integer

expense_delete() public method

delete exp entry
public expense_delete ( integer $id ) : object
$id integer -> ID of record
return object

expense_edit() public method

edit exp entry
public expense_edit ( integer $id, array $data ) : object
$id integer
$data array
return object

expense_get() public method

Returns the data of a certain expense record
Author: ob
public expense_get ( integer $expId ) : array
$expId integer
return array the record's data as array, false on failure

get_expense() public method

returns single expense entry as array
Author: sl
public get_expense ( integer $id ) : array
$id integer ID of entry in table exp
return array

get_expenses() public method

returns expenses for specific user as multidimensional array
Author: th
Author: Alexander Bauer
public get_expenses ( integer $start, integer $end, integer $users = null, $customers = null, $projects = null, $reverse_order = false, $filter_refundable, integer $filterCleared = null, $startRows, $limitRows, $countOnly = false ) : array
$start integer
$end integer
$users integer ID of user in table users
$filterCleared integer
return array