Method |
Description |
|
__construct ( Kimai_Config &$kga, boolean $autoConnect = true ) |
Instantiate a new database layer. |
|
activity_create ( array $data, array $activityGroups ) : integer |
Adds a new activity |
|
activity_delete ( array $activityID ) : boolean |
deletes an activity |
|
activity_edit ( array $activityID, array $data, array $activityGroups ) : boolean |
Edits an activity by replacing its data by the new array |
|
activity_get_data ( array $activityID ) : array |
Returns the data of a certain activity |
|
activity_get_groupIDs ( integer $activityID ) : array |
returns all the group ids of the given activity |
|
activity_get_groups ( array $activityID ) : array |
returns all the groups of the given activity |
|
activity_get_projectIds ( integer $activityID ) : array |
returns all the project ids to which the activity was assigned |
|
activity_get_projects ( integer $activityId ) : array |
returns all the projects to which the activity was assigned |
|
allFittingFixedRates ( $projectID, $activityID ) : array | boolean |
Query the database for all fitting fixed rates for the given user, project and activity. |
|
allFittingRates ( $userID, $projectID, $activityID ) : array | boolean |
Query the database for all fitting rates for the given user, project and activity. |
|
assignActivityToProjectsForGroup ( integer $activityID, array $projectIDs, integer $group ) : boolean |
associates an Activity with a collection of Projects in the context of a user group. |
|
assignProjectToActivitiesForGroup ( integer $projectID, array $activityIDs, integer $group ) : boolean |
associates a Project with a collection of Activities in the context of a user group. |
|
assign_activityToGroups ( integer $activityID, array $groupIDs ) : boolean |
Assigns an activity to 1-n groups by adding entries to the cross table |
|
assign_activityToProjects ( integer $activityID, array $projectIDs ) : boolean |
Assigns an activity to 1-n projects by adding entries to the cross table |
|
assign_customerToGroups ( integer $customerID, array $groupIDs ) : boolean |
Assigns a customer to 1-n groups by adding entries to the cross table |
|
assign_groupToActivities ( array $groupID, array $activityIDs ) : boolean |
Assigns a group to 1-n activities by adding entries to the cross table
(counterpart to assign_activityToGroups) |
|
assign_groupToCustomers ( array $groupID, array $customerIDs ) : boolean |
Assigns a group to 1-n customers by adding entries to the cross table
(counterpart to assign_customerToGroups) |
|
assign_groupToProjects ( array $groupID, array $projectIDs ) : boolean |
Assigns a group to 1-n projects by adding entries to the cross table
(counterpart to assign_projectToGroups) |
|
assign_projectToActivities ( integer $projectID, array $activityIDs ) : boolean |
Assigns 1-n activities to a project by adding entries to the cross table |
|
assign_projectToGroups ( integer $projectID, array $groupIDs ) : boolean |
Assigns a project to 1-n groups by adding entries to the cross table |
|
checkMembershipPermission ( integer $userId, array $objectGroups, string $permission, string $requiredFor = 'all' ) : boolean |
Check if a user is allowed to access an object for a given action. |
|
checkUserInternal ( $kimai_user ) |
A drop-in function to replace checkuser() and be compatible with none-cookie environments. |
|
clean_data ( array $data ) : array |
Prepare all values of the array so it's save to put them into an sql query. |
|
configuration_edit ( array $data ) : boolean |
Edits a configuration variables by replacing the data by the new array |
|
connect ( string $host, string $database, string $username, string $password, boolean $utf8 = true ) |
Connect to the database. |
|
customer_create ( array $data ) : integer |
Add a new customer to the database. |
|
customer_delete ( integer $customerID ) : boolean |
deletes a customer |
|
customer_edit ( integer $customerID, array $data ) : boolean |
Edits a customer by replacing his data by the new array |
|
customer_get_data ( integer $customerID ) : array |
Returns the data of a customer |
|
customer_get_groupIDs ( integer $customerID ) : array |
returns all IDs of the groups of the given customer |
|
customer_loginSetKey ( $customerId, $keymai ) |
Save a new secure key for a customer to the database. This key is stored in the clients cookie and used
to reauthenticate the customer. |
|
customer_nameToID ( integer $name ) : integer |
return ID of specific user named 'XXX' |
|
getActivityTable ( ) : string |
|
|
getConnectionHandler ( ) |
Return the connection handler used to connect to the database. |
|
getCustomerTable ( ) : string |
|
|
getExpenseTable ( ) : string |
|
|
getGroupMemberships ( integer $userId ) : array |
Get the groups in which the user is a member in. |
|
getGroupsUsersTable ( ) : string |
|
|
getLastError ( ) : string |
|
|
getNonManagableAssignedElementIds ( string $parentSubject, string $subject, integer $parentId, integer $group ) : array |
computes an array of (project- or activity-) ids for Project-Activity-Assignments that are unmanage-able for the given group. |
|
getPreferencesTable ( ) : string |
|
|
getProjectTable ( ) : string |
|
|
getRatesTable ( ) : string |
|
|
getStatuses ( ) : array |
Return all available status entries. |
|
getTablePrefix ( ) : string |
|
|
getTimeSheetTable ( ) : string |
|
|
getUserByApiKey ( string $apikey ) : string | null |
Returns a username for the given $apikey. |
|
getUserTable ( ) : string |
|
|
get_DBversion ( ) : array |
returns the version of the installed Kimai database to compare it with the package version |
|
get_activities ( array $groups = null ) : array | boolean |
Get all available activities. |
|
get_activities_by_customer ( integer $customer_ID ) : array |
returns list of activities used with specified customer |
|
get_activities_by_project ( integer $projectID, array $groups = null ) : array |
Get an array of activities, which should be displayed for a specific project. |
|
get_activity_budget ( $projectID, $activityID ) : array | boolean |
Read activity budgets |
|
get_best_fitting_fixed_rate ( $projectID, $activityID ) : boolean |
Query the database for the best fitting fixed rate for the given user, project and activity. |
|
get_best_fitting_rate ( $userID, $projectID, $activityID ) : boolean |
Query the database for the best fitting rate for the given user, project and activity. |
|
get_budget_used ( integer $projectID, integer $activityID ) : integer |
get the whole budget used for the activity |
|
get_current_recordings ( integer $userID ) : array |
Returns a list of IDs of all current recordings. |
|
get_current_timer ( ) : array |
returns time of currently running activity recording as array |
|
get_customer_config ( integer $userID ) : array |
returns configuration for specified customer |
|
get_customer_watchable_users ( integer $customer ) : array |
|
|
get_customers ( array $groups = null ) : array |
returns list of customers in a group as array |
|
get_duration ( integer $start, integer $end, null $users = null, null $customers = null, null $projects = null, null $activities = null, null $filterCleared = null ) : integer |
returns time summary of current timesheet |
|
get_fixed_rate ( $projectID, $activityID ) : boolean |
Read fixed rate from database. |
|
get_groups ( integer $trash ) : array |
returns array of all groups
[0]=> array(6) {
["groupID"] => string(1) "1"
["groupName"] => string(5) "admin"
["userID"] => string(9) "1234"
["trash"] => string(1) "0"
["count_users"] => string(1) "2"
}
[1]=> array(6) {
["groupID"] => string(1) "2"
["groupName"] => string(4) "Test"
["userID"] => string(9) "12345"
["trash"] => string(1) "0"
["count_users"] => string(1) "1"
} |
|
get_latest_running_entry ( ) : array |
Return the latest running entry with all information required for the buzzer. |
|
get_projects ( array $groups = null ) : array |
returns list of projects for specific group as array |
|
get_projects_by_customer ( integer $customerID, array $groups = null ) : array |
returns list of projects for specific group and specific customer as array |
|
get_rate ( $userID, $projectID, $activityID ) : boolean |
Read rate from database. |
|
get_seq ( integer $user ) : string |
returns the key for the session of a specific user |
|
get_status ( array $statusIds ) : array |
return status names |
|
get_statuses ( ) : array |
returns array of all status with the status id as key |
|
get_timeSheet ( integer $start, integer $end, array $users = null, array $customers = null, array $projects = null, array $activities = null, boolean $limit = false, boolean $reverse_order = false, integer $filterCleared = null, integer $startRows, integer $limitRows, boolean $countOnly = false ) : array |
returns timesheet for specific user as multidimensional array |
|
get_time_activities ( integer $start, integer $end, array $users = null, array $customers = null, array $projects = null, array $activities = null ) : array |
returns list of time summary attached to activity ID's within specific timeframe as array |
|
get_time_customers ( integer $start, integer $end, array $users = null, array $customers = null, array $projects = null, array $activities = null ) : array |
returns list of time summary attached to customer ID's within specific timeframe as array |
|
get_time_projects ( integer $start, integer $end, array $users = null, array $customers = null, array $projects = null, array $activities = null ) : array |
returns list of time summary attached to project ID's within specific timeframe as array |
|
get_time_users ( integer $start, integer $end, array $users = null, array $customers = null, array $projects = null, null $activities = null ) : array |
returns assoc. array where the index is the ID of a user and the value the time
this user has accumulated in the given time with respect to the filtersettings |
|
get_user_config ( integer $userID ) : array |
returns configuration data for specified user |
|
get_user_watchable_users ( integer $user ) : array |
returns list of users the given user can watch |
|
get_users ( integer $trash, array $groups = null ) : array |
returns array of all users
[userID] => 23103741
[name] => admin
[mail] => 0
[active] => 0 |
|
getjointime ( integer $userID ) : integer |
returns the date of the first timerecord of a user (when did the user join?)
this is needed for the datepicker |
|
globalRole_find ( $filter ) : array | boolean |
|
|
globalRole_get_data ( $globalRoleID ) : array | boolean |
|
|
global_role_allows ( integer $roleID, string $permission ) : boolean |
Check if a global role gives permission for a specific action. |
|
global_role_create ( $data ) : boolean | integer |
|
|
global_role_delete ( $globalRoleID ) : boolean |
|
|
global_role_edit ( $globalRoleID, $data ) : boolean |
|
|
global_roles ( ) : array | boolean |
|
|
group_count_users ( array $groupID ) : integer |
Returns the number of users in a certain group |
|
group_create ( array $data ) : integer |
Adds a new group |
|
group_delete ( array $groupID ) : boolean |
deletes a group |
|
group_edit ( array $groupID, array $data ) : boolean |
Edits a group by replacing its data by the new array |
|
group_get_data ( array $groupID ) : array |
Returns the data of a certain group |
|
initializeConfig ( Kimai_Config $config ) |
Prefills the Config (and inherited settings) object with configuration data. |
|
isConnected ( ) : boolean |
|
|
isValidActivityId ( integer $activityId ) : boolean |
checks if given $activityId exists in the db |
|
isValidProjectId ( integer $projectId ) : boolean |
checks if given $projectId exists in the db |
|
is_customer_name ( string $name ) : boolean |
checks if a customer with this name exists |
|
is_watchable_user ( integer $user, integer $userID ) : boolean |
Checks if a user (given by user ID) can be accessed by another user (given by user array): |
|
loginUpdateBan ( $userId, boolean $resetTime = false ) |
Update the ban status of a user. This increments the ban counter. |
|
membershipRole_find ( $filter ) : array | boolean |
|
|
membershipRole_get_data ( $membershipRoleID ) : array | boolean |
|
|
membership_role_allows ( integer $roleID, string $permission ) : boolean |
Check if a membership role gives permission for a specific action. |
|
membership_role_create ( $data ) : boolean | integer |
|
|
membership_role_delete ( $membershipRoleID ) : boolean |
|
|
membership_role_edit ( $membershipRoleID, $data ) : object |
|
|
membership_roles ( ) : array | boolean |
|
|
project_activity_edit ( integer $projectID, integer $activityID, array $data ) : boolean |
update the data for activity per project, which is budget, approved and effort |
|
project_create ( array $data ) : integer |
Adds a new project |
|
project_delete ( array $projectID ) : boolean |
deletes a project |
|
project_edit ( integer $projectID, array $data ) : boolean |
Edits a project by replacing its data by the new array |
|
project_get_activities ( integer $projectID ) : array |
returns all the activities which were assigned to a project |
|
project_get_activityIDs ( integer $projectID ) : array |
returns all the activity ids which were assigned to a project |
|
project_get_data ( integer $projectID ) : array |
Returns the data of a certain project |
|
project_get_groupIDs ( array $projectID ) : array |
returns all the groups of the given project |
|
queryAll ( string $query ) : array |
Return all rows for the given sql query. |
|
remove_fixed_rate ( $projectID, $activityID ) : boolean |
Remove fixed rate from database. |
|
remove_rate ( $userID, $projectID, $activityID ) : boolean |
Remove rate from database. |
|
save_fixed_rate ( $projectID, $activityID, $rate ) : boolean |
Save fixed rate to database. |
|
save_rate ( $userID, $projectID, $activityID, $rate ) : boolean |
Save rate to database. |
|
save_timeframe ( string $timeframeBegin, string $timeframeEnd, string $user ) : boolean |
saves timeframe of user in database (table conf) |
|
setGroupMemberships ( integer $userId, array $groups = null ) : false | null |
Set the groups in which the user is a member in. |
|
startRecorder ( integer $projectID, $activityID, $user ) : integer |
starts timesheet record |
|
status_create ( array $status ) : boolean |
add a new status |
|
status_delete ( array $statusID ) : boolean |
deletes a status |
|
status_edit ( array $statusID, array $data ) : boolean |
Edits a status by replacing its data by the new array |
|
status_get_data ( array $statusID ) : array |
Returns the data of a certain status |
|
status_timeSheetEntryCount ( integer $statusID ) : integer |
Returns the number of time sheet entries with a certain status |
|
stopRecorder ( integer $id ) : boolean |
Performed when the stop buzzer is hit. |
|
timeEntry_create ( array $data ) : boolean | integer |
create time sheet entry |
|
timeEntry_delete ( integer $id ) : object |
delete time sheet entry |
|
timeEntry_edit ( integer $id, array $data ) : boolean |
edit time sheet entry |
|
timeEntry_edit_activity ( integer $timeEntryID, integer $activityID ) : object |
Just edit the activity for an entry. This is used for changing the activity
of a running entry. |
|
timeEntry_edit_project ( integer $timeEntryID, integer $projectID ) : object |
Just edit the project for an entry. This is used for changing the project
of a running entry. |
|
timeSheet_get_data ( integer $timeEntryID ) : array |
Returns the data of a certain time record |
|
timeSheet_whereClausesFromFilters ( array $users, array $customers, array $projects, array $activities = [] ) : array |
Creates an array of clauses which can be joined together in the WHERE part
of a sql query. The clauses describe whether a line should be included
depending on the filters set. |
|
transaction_begin ( ) : boolean |
|
|
transaction_end ( ) : boolean |
|
|
transaction_rollback ( ) : boolean |
|
|
userIDToName ( string $id ) : integer |
return name of a user with specific ID |
|
user_create ( array $data ) : boolean | integer |
Adds a new user |
|
user_delete ( integer $userID, boolean $moveToTrash = false ) : boolean |
deletes a user |
|
user_edit ( integer $userID, array $data ) : boolean |
Edits a user by replacing his data and preferences by the new array |
|
user_get_data ( string $userID ) : array |
Returns the data of a certain user |
|
user_get_membership_role ( integer $userID, integer $groupID ) : integer | boolean |
Returns the membership roleID the user has in the given group. |
|
user_get_preferences ( array $keys, integer $userId = null ) : array |
Get several preferences for a user. If no user ID is given the current user is used. |
|
user_get_preferences_by_prefix ( string $prefix, integer $userId = null ) : array |
Get several preferences for a user which have a common prefix. The returned preferences are striped off
the prefix. |
|
user_loginSetKey ( $userId, $keymai ) |
Save a new secure key for a user to the database. This key is stored in the users cookie and used
to reauthenticate the user. |
|
user_name2id ( integer $name ) : string | boolean |
return ID of specific user by name |
|
user_set_preferences ( array $data, string $prefix = '', integer $userId = null ) : boolean |
Save one or more preferences for a user. If no user ID is given the current user is used. |
|