EmployeeHandler
This class contains the functions to perform the following:
api | |
---|---|
package | simPROAPI |
subpackage | Staff |
author | Nathan Muir |
version | 2011-08-15 |
uses | \global\StaffHandler |
AttachmentsRetrieve(mixed $CompanyID, int $EmployeeID) : array
This function retrieves the list of attachemnts for the provided employee id
uses | \StaffHandler::RetrieveAttachments() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
int
The employee member to retrieve licences for
array
Flag(int $CompanyID, int $EmployeeID) : bool
This function flags a particular employee as exported
int
the Company ID. In single company builds, this is 0.
int
The employee to flag as exported
bool
FlagList(int $CompanyID, array $EmployeeIDs) : array
This function flags a list of employees as exported
int
the Company ID. In single company builds, this is 0.
array
The employee list to flag as exported
array
Insert(int $CompanyID, array $EmployeeDetails) : int
<?php
array_keys($EmployeeDetails) == array(
"EmployeeName",
"HomeAddress",
"HomeSuburb",
"HomeState",
"HomePostcode",
"HomeCountry",
"Phone1",
"Mobile",
"Fax",
"Email",
"Active",
"TaxFileNo",
"AccountName",
"BSB",
"AccountNo",
"DateOfBirth",
"DateOfCommencement",
"Export",
"CustomFields",
"Position"
);
?>
int
the company id
array
an associative array of employee information.
int
LicenceInsert(int $CompanyID, int $EmployeeID, array $LicenceDetails = array()) : bool
<?php
array_keys($LicenceDetails) == array (
'LicenceName',
'LicenceReference',
'LicenceExpiry',
)
This function inserts a licence for a particular employee
int
the Company ID. In single company builds, this is 0.
int
employee ID to link the licence.
array
an associative array of licence information
bool
LicencesRetrieve(int $CompanyID, int $EmployeeID) : array
This function retrieves licences for the provided employee id
uses | \StaffHandler::RetrieveLicences() |
---|
int
the Company ID. In single company builds, this is 0.
int
The employee member to retrieve licences for
array
LicencesSearch(mixed $CompanyID, string $Search = '') : array
This function retrieves licences for all employees under a company
mixed
the Company ID. In single company builds, this is 0.
string
The search string for the licence name.
array
Retrieve(mixed $CompanyID, int $EmployeeID) : array
This function retrieves a employee with a specific ID
uses | \EmployeeHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
int
employee id
array
RetrieveAll(mixed $CompanyID) : array
This function retrieves a list of employees
uses | \EmployeeHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
RetrieveCurrent(array $Detail = array()) : array
This function retrieves the currently logged in user as well as the server time
uses | \EmployeeHandler::RetrieveList() |
---|
array
the specification of which details to return - ("Zones","Departments","Companies","Billing"). Null/Empty/Empty array will return none.
array
RetrieveExport(mixed $CompanyID) : array
This function retrieves a list of employees that are ready for export
uses | \EmployeeHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
RetrieveList(mixed $CompanyID, array $EmployeeIDs, array $Detail = array()) : array
This function retrieves details on the provided list of employee ids
uses | \StaffHandler::RetrieveList() |
---|---|
used_by | \EmployeeHandler::Search() |
used_by | \EmployeeHandler::SearchFields() |
used_by | \EmployeeHandler::Retrieve() |
used_by | \EmployeeHandler::RetrieveCurrent() |
used_by | \EmployeeHandler::RetrieveExport() |
used_by | \EmployeeHandler::RetrieveAll() |
used_by | \StaffHandler::RetrieveList() |
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
list of Employee ID's to retrieve.
array
the specification of which details to return - ("Zones","Departments","Companies","BillRates"). Null/Empty/Empty array will return none.
array
Search(mixed $CompanyID, string $Search = '%', array $Detail = array()) : array
This function retrieve's a list of employee who's name matches the search term.
uses | \EmployeeHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
string
The search text for the employee. Can use % for wildcards.
array
the specification of which details to return - ("Zones","Departments","Companies","Billing"). Null/Empty/Empty array will return none.
array
SearchFields(mixed $CompanyID, array $SearchTerms) : array
This function retrieve's a list of employees who's set of fields match their associated values
Implemented Search Terms are: SalesPerson, ProjectManagerID, UserName, Zone, ZoneName, Export
uses | \EmployeeHandler::RetrieveList() |
---|
mixed
the Company IDs. Can be a single Company ID or an array of Company IDs. In single company builds, this is 0.
array
An associative array of Search Fields[key] and their search terms [value]
array
TotalCount(int $CompanyID) : array
This function returns the total number of Employees that are not archived
int
the Company ID. In single company builds, this is 0.
array
UnFlag(int $CompanyID, int $EmployeeID) : bool
This function Unflags a particular employee as exported
int
the Company ID. In single company builds, this is 0.
int
The employee to Unflag as exported
bool
UnFlagList(int $CompanyID, array $EmployeeIDs) : array
This function Unflags a list of employees as exported
int
the Company ID. In single company builds, this is 0.
array
The employee list to Unflag as exported
array
Update(int $CompanyID, int $EmployeeID, array $EmployeeDetails) : bool
<?php
array_keys($EmployeeDetails) == array(
"EmployeeName",
"HomeAddress",
"HomeSuburb",
"HomeState",
"HomePostcode",
"HomeCountry",
"Phone1",
"Mobile",
"Fax",
"Email",
"Active",
"TaxFileNo",
"AccountName",
"BSB",
"AccountNo",
"DateOfBirth",
"DateOfCommencement",
"Export",
"CustomFields",
"Position"
);
?>
int
the company id
int
The employee id to update with the supplied information
array
an associative array of employee information.
bool