| 
				 public 
				
				
				 | 
			#
			__construct( )
				
Initialize Logs Overrides | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addEmail( array $vars )
				
Logs a single email Parameters
						$varsarray$vars An array of variable log info, including - company_id The company ID -
to_client_id The client ID this log is to (optional) - from_staff_id The staff
ID this log is from (optional) - to_address A To email address - from_address A
From email address - from_name A from name - cc_address A comma separated list
of CC addresses (optional) - subject An email subject - body_text Plain text
email body (optional) - body_html HTML email body (optional) - sent Whether this
email has been sent, either 0 (default) or 1 (optional) - error A message to be
used on error
Returns
						integerThe email log ID for this record, void if error
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addGateway( array $vars )
				
Logs a gateway requests Parameters
						$varsarray$vars An array of variable log info, including - staff_id The staff ID -
gateway_id The gateway ID - direction The direction type, either 'input'
(default) or 'output' (optional) - url The URL - data Gateway data (optional) -
from_name A from name - status The status type, either 'error' (default) or
'success' (optional) - group The gateway group
Returns
						integerThe gateway log ID for this record, void if error
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addModule( array $vars )
				
Logs a module request Parameters
						$varsarray$vars An array of variable log info, including - staff_id The staff ID
(optional) - module_id The module ID - direction The direction type, either
'input' (default) or 'output' (optional) - url The URL - data Gateway data
(optional) - from_name A from name - status The status type, either 'error'
(default) or 'success' (optional) - group The module group
Returns
						integerThe module log ID for this record, void if error
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addUser( array $vars )
				
Logs a user log in Parameters
						$varsarray$vars An array of variable log info, including - user_id The user ID -
ip_address The IP address - company_id The company ID - result The result of the
login attempt: - success - failure
Returns
						integerThe user log ID for this record, void if error
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			updateUser( integer $user_id, string $ip_address, integer $company_id )
				
Updates the user log for a user 
				
Updates the user log for a user Parameters
						$user_idinteger$user_id The user's ID
$ip_addressstring$ip_address The user's IP address
$company_idinteger$company_id The company ID
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addContact( array $vars )
				
Logs a change to contact information 
				
Logs a change to contact information Parameters
						$varsarray$vars An array of contact change data including: - contact_id The ID of the
contact that has been modified - fields An array of fields where the key if the
field that changed and contains: - prev The value of the field prior to the
update - cur The value of that field after the update
Returns
						integerThe contact log ID for this record, void if error
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addAccountAccess( array $vars )
				
Logs access to customer payment account details 
				
Logs access to customer payment account details Parameters
						$varsarray$vars An array of access information including: - staff_id The ID of the staff
member that accessed the account details - first_name The first name of the
account holder - last_name The last name of the account holder - type The
account type ('ach','cc') - account_type The ACH or CC account type (i.e.
'savings', or 'visa') - last4 The encrypted last 4 digits of the account number
(must be encrypted using AppModel::systemEncrypt()) - account_id The ID of the
account accessed (accounts_ach.id or accounts_cc.id)
Returns
						integerThe account access log ID for this record, void if error
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addCron( array $vars )
				
Logs cron task details Parameters
						$varsarray$vars An array of cron task information including: - run_id The cron task run ID
- event This cron log event (optional, default "") - group The group associated
with this cron event - output The output from running this task (optional) -
start_date The date time that the cron task began running - end_date The date
time that the cron task completed (optional)
Returns
						integerThe cron log ID, or void on error
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			updateCron( integer $cron_task_run_id, string $group, string $event = "", array $vars = array() )
				
Updates the cron log for a particular logged task 
				
Updates the cron log for a particular logged task Parameters
						$cron_task_run_idinteger$cron_task_run_id The cron task run ID of the logged task
$groupstring$group The group of the logged task
$eventstring$event The cron log event (optional, default "")
$varsarray$vars An array of cron task information including: - output The output from
running this task (optional) - end_date The date time that the cron task
completed (optional)
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			addTransaction( array $vars )
				
Logs a change to transaction information 
				
Logs a change to transaction information Parameters
						$varsarray$vars An array of transaction change data including: - staff_id The ID of the
staff member that made the change (optional) - transaction_id The ID of the
transaction that has been modified - fields An array of fields where the key if
the field that changed and contains: - prev The value of the field prior to the
update - cur The value of that field after the update
Returns
						integerThe transaction log ID for this record, void if error
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getModuleList( integer $page = 1, array $order_by = array('date_added'=>"DESC"), boolean $group_results = false )
				
Fetches a list of all module log entries 
				
Fetches a list of all module log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
$group_resultsboolean$group_results True to group results by group, false to not group at all (useful
for page nav, optional, default false)
Returns
						mixedAn array of stdClass objects representing module logs, or false if no logs found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getModuleListCount( boolean $group_results = false )
				
Returns the total number of module log entries returned from
Logs::getModuleList(), useful in constructing pagination for the getModuleList()
method. 
				
Returns the total number of module log entries returned from
Logs::getModuleList(), useful in constructing pagination for the getModuleList()
method. Parameters
						$group_resultsboolean$group_results True to group results by group, false to not group at all (useful
for page nav, optional, default false)
Returns
						integerThe total number of module logs
 
 See | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getModuleGroupList( string $group )
				
Retrieves a list of all module log entries for a particular module group 
				
Retrieves a list of all module log entries for a particular module group Parameters
						$groupstring$group The name of the group whose logs to retrieve
Returns
						mixedAn array of stdClass objects representing module logs for a particular group,
false otherwise
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteModuleLogs( string $datetime )
				
Deletes all of the module logs up until the date given for the current
company 
				
Deletes all of the module logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getGatewayList( integer $page = 1, array $order_by = array('date_added'=>"DESC"), boolean $group_results = false )
				
Fetches a list of all gateway log entries 
				
Fetches a list of all gateway log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
$group_resultsboolean$group_results True to group results by group, false to not group at all (useful
for page nav, optional, default false)
Returns
						mixedAn array of stdClass objects representing gateway logs, or false if no logs
found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getGatewayListCount( boolean $group_results = false )
				
Returns the total number of gateway log entries returned from
Logs::getGatewayList(), useful in constructing pagination for the
getGatewayList() method. 
				
Returns the total number of gateway log entries returned from
Logs::getGatewayList(), useful in constructing pagination for the
getGatewayList() method. Parameters
						$group_resultsboolean$group_results True to group results by group, false to not group at all (useful
for page nav, optional, default false)
Returns
						integerThe total number of gateway logs
 
 See | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getGatewayGroupList( string $group )
				
Retrieves a list of all gateway log entries for a particular gateway
group 
				
Retrieves a list of all gateway log entries for a particular gateway
group Parameters
						$groupstring$group The name of the group whose logs to retrieve
Returns
						mixedAn array of stdClass objects representing gateway logs for a particular group,
false otherwise
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteGatewayLogs( string $datetime )
				
Deletes all of the gateway logs up until the date given for the current
company 
				
Deletes all of the gateway logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getEmail( integer $email_log_id )
				
Fetches a single email log 
				
Fetches a single email log Parameters
						$email_log_idinteger$email_log_id The email log ID of the email to get
Returns
						mixedAn stdClass representing the email log, or false if none found
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getEmailList( integer $page = 1, array $order_by = array('date_sent'=>"DESC") )
				
Fetches a list of all email log entries 
				
Fetches a list of all email log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						arrayAn array of stdClass objects representing email logs
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getEmailListCount( )
				
Returns the total number of email log entries returned from
Logs::getEmailList(), useful in constructing pagination for the getEmailList()
method. 
				
Returns the total number of email log entries returned from
Logs::getEmailList(), useful in constructing pagination for the getEmailList()
method. Returns
						integerThe total number of email logs
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteEmailLogs( string $datetime )
				
Deletes all of the email logs up until the date given for the current
company 
				
Deletes all of the email logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getUserLog( integer $user_id, string $type = "any" )
				
Fetches the last log entry for the given user 
				
Fetches the last log entry for the given user Parameters
						$user_idinteger$user_id The ID of the user
$typestring$type The specific log result to fetch (optional), one of: - success The last
successful log entry - failure The last failure log entry - any The last log
entry (default)
Returns
						mixedAn stdClass object representing the user log entry, or false if none exist
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getUserList( integer $page = 1, array $order_by = array('date_added'=>"DESC") )
				
Fetches a list of all user log entries 
				
Fetches a list of all user log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						mixedAn array of stdClass objects representing user logs, or false if no logs found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getUserListCount( )
				
Returns the total number of user log entries returned from
Logs::getUserList(), useful in constructing pagination for the getUserList()
method. 
				
Returns the total number of user log entries returned from
Logs::getUserList(), useful in constructing pagination for the getUserList()
method. Returns
						integerThe total number of user logs
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteUserLogs( string $datetime )
				
Deletes all of the users logs up until the date given for the current
company 
				
Deletes all of the users logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getContactList( integer $page = 1, array $order_by = array('date_changed'=>"DESC") )
				
Fetches a list of all contact log entries 
				
Fetches a list of all contact log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						mixedAn array of stdClass objects representing contact logs, or false if no logs
found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getContactListCount( )
				
Returns the total number of contact log entries returned from
Logs::getContactList(), useful in constructing pagination for the
getContactList() method. 
				
Returns the total number of contact log entries returned from
Logs::getContactList(), useful in constructing pagination for the
getContactList() method. Returns
						integerThe total number of contact logs
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteContactLogs( string $datetime )
				
Deletes all of the contact logs up until the date given for the current
company 
				
Deletes all of the contact logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getTransactionList( integer $page = 1, array $order_by = array('date_changed'=>"DESC") )
				
Fetches a list of all transaction log entries 
				
Fetches a list of all transaction log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						arrayAn array of stdClass objects representing transaction logs
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getTransactionListCount( )
				
Returns the total number of transaction log entries returned from
Logs::getTransactionLogs(), useful in constructing pagination for the
getTransactionList() method. 
				
Returns the total number of transaction log entries returned from
Logs::getTransactionLogs(), useful in constructing pagination for the
getTransactionList() method. Returns
						integerThe total number of transaction logs
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteTransactionLogs( string $datetime )
				
Deletes all of the transaction logs up until the date given for the current
company 
				
Deletes all of the transaction logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getAccountAccessList( integer $page = 1, array $order_by = array('date_accessed'=>"DESC") )
				
Fetches a list of all account access log entries 
				
Fetches a list of all account access log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						mixedAn array of stdClass objects representing account access logs, or false if no
logs found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getAccountAccessListCount( )
				
Returns the total number of contact log entries returned from
Logs::getAccountAccessList(), useful in constructing pagination for the
getAccountAccessList() method. 
				
Returns the total number of contact log entries returned from
Logs::getAccountAccessList(), useful in constructing pagination for the
getAccountAccessList() method. Returns
						integerThe total number of account access logs
 
 See | 
		
			| 
				 public 
				An
				
				 | 
			#
			getAccountAccessLog( integer $log_id )
				
Fetches account data that was accessed 
				
Fetches account data that was accessed Parameters
						$log_idinteger$log_id The access log ID
Returns
						Anarray of stdClass objects representing an account access log, or false if no log
found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteAccountAccessLogs( string $datetime )
				
Deletes all of the account access logs up until the date given for the
current company 
				
Deletes all of the account access logs up until the date given for the
current company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getLatestCron( integer $cron_task_run_id, string $group = null )
				
Fetches the latest cron log for the given run task belonging to this
company 
				
Fetches the latest cron log for the given run task belonging to this
company Parameters
						$cron_task_run_idinteger$cron_task_run_id The cron task run ID
$groupstring$group The group the cron task is apart of (optional, default null)
Returns
						mixedAn stdClass object representing the cron log for this task, or false if none
exist
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getCronLastRun( integer $cron_task_key, string $plugin_dir = null, boolean $system = false )
				
Fetches the date at which the given cron task has last been executed 
				
Fetches the date at which the given cron task has last been executed Parameters
						$cron_task_keyinteger$cron_task_key The cron task key
$plugin_dirstring$plugin_dir The plugin directory of the plugin this task belongs to (optional)
$systemboolean$system True to fetch only system cron tasks, false to fetch company cron tasks
(default false)
Returns
						mixedAn stdClass object representing the date this cron task was last executed, or
false if it has never run
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getSystemCronLastRun( string $group = null )
				
Fetches the date at which the system cron has last been executed 
				
Fetches the date at which the system cron has last been executed Parameters
						$groupstring$group The group the cron task is apart of (optional, default null)
Returns
						mixedAn stdClass object representing the system cron, or false if it has never run
 
 | 
		
			| 
				 public 
				
				
				 | 
			#
			clearCronTask( integer $cron_task_run_id, string $group = null )
				
Clears an incomplete cron task if it has not finished 
				
Clears an incomplete cron task if it has not finished Parameters
						$cron_task_run_idinteger$cron_task_run_id The cron task run ID
$groupstring$group The group the cron task is apart of (optional, default null)
 | 
		
			| 
				 public 
				array
				
				 | 
			#
			getRunningCronTasks( integer $seconds = null )
				
Fetches a list of cron tasks that are currently running for this company
within the past 24 hours (i.e. started but not finished) 
				
Fetches a list of cron tasks that are currently running for this company
within the past 24 hours (i.e. started but not finished) Parameters
						$secondsinteger$seconds Filter on the number of seconds that have passed since the task has
started but not yet completed (optional, null to fetch all tasks currently
running)
Returns
						arrayA list of stdClass objects representing each cron task
 
 | 
		
			| 
				 public 
				mixed
				
				 | 
			#
			getCronList( integer $page = 1, array $order_by = array('start_date'=>"DESC") )
				
Fetches a list of all cron log entries 
				
Fetches a list of all cron log entries Parameters
						$pageinteger$page The page to return results for (optional, default 1)
$order_bystring$order_by The sort and order conditions (e.g. array('sort_field'=>"ASC"),
optional)
Returns
						mixedAn array of stdClass objects representing user logs, or false if no logs found
 
 | 
		
			| 
				 public 
				integer
				
				 | 
			#
			getCronListCount( )
				
Returns the total number of cron log entries returned from
Logs::getCronList(), useful in constructing pagination for the getCronList()
method. 
				
Returns the total number of cron log entries returned from
Logs::getCronList(), useful in constructing pagination for the getCronList()
method. Returns
						integerThe total number of cron logs
 
 See | 
		
			| 
				 public 
				integer
				
				 | 
			#
			deleteCronLogs( string $datetime )
				
Deletes all of the cron logs up until the date given for the current
company 
				
Deletes all of the cron logs up until the date given for the current
company Parameters
						$datetimestring$datetime The datetime of the earliest log to keep. All older logs will be
purged
Returns
						integerThe number of records deleted
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateDirection( string $direction )
				
Validates the 'direction' field for module and gateway logs 
				
Validates the 'direction' field for module and gateway logs Parameters
						$directionstring$direction The direction
Returns
						booleanTrue if direction is validated, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateStatus( string $status )
				
Validates the 'status' field for module and gateway logs 
				
Validates the 'status' field for module and gateway logs Parameters
						$statusstring$status The status
Returns
						booleanTrue if status is validated, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateType( string $type )
				
Validates the 'type' field for the account access logs 
				
Validates the 'type' field for the account access logs Parameters
						$typestring$type The type
Returns
						booleanTrue if type is validated, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCronExists( integer $cron_task_run_id )
				
Validates that the given cron task run ID exists 
				
Validates that the given cron task run ID exists Parameters
						$cron_task_run_idinteger$cron_task_run_id The cron task run ID
Returns
						booleanTrue if the cron task run ID exists, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateCronLogUnique( string $group, integer $cron_task_run_id, string $event )
				
Checks whether the given cron task ID and group are unique 
				
Checks whether the given cron task ID and group are unique Parameters
						$groupstring$group The cron task group
$cron_task_run_idinteger$cron_task_run_id The cron task run ID
$eventstring$event The cron event
Returns
						booleanTrue if the given cron task run ID, group, and event are unique, false otherwise
 
 | 
		
			| 
				 public 
				boolean
				
				 | 
			#
			validateUserLogExists( integer $user_id, string $ip_address, integer $company_id )
				
Checks whether the given information corresponds to a valid user log
entry 
				
Checks whether the given information corresponds to a valid user log
entry Parameters
						$user_idinteger$user_id The user's ID to check
$ip_addressstring$ip_address The IP address of the user
$company_idinteger$company_id The ID of the company
Returns
						booleanTrue if the given information matches a user in the log, false otherwise
 
 |