Tuskfish API V1.1.1
  • Package
  • Class

Packages

  • content
  • core
  • database
  • installation
  • security
  • user
  • utilities

Classes

  • someClass
  • someClassHandler
  • TfCache
  • TfFileHandler
  • TfLogger
  • TfPreference
  • TfPreferenceHandler
  • TfTree

Traits

  • TfLanguage
  • TfMagicMethods
  • TfMimetypes

Functions

  • checkPasswordStrength
  • hashPassword
  • tf_autoload
  • tfContentModuleAutoload
  • tfSomeModuleAutoload

Class TfLogger

Provides a custom error handler which writes to a logfile.

Custom error handler functions such as this one should return FALSE; otherwise calls to trigger_error($msg, E_USER_ERROR) will not cause a script to stop execution!

Package: core
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Var: TfValidator $validator Instance of the Tuskfish data validator class.
Located at trust_path/libraries/tuskfish/class/TfLogger.php

Methods summary

public
# __construct( TfValidator $validator )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.
public boolean
# logError( integer $errno = null, string $error = '', string $file = '', integer $line = null )

Tuskfish custom error logger class.

Tuskfish custom error logger class.

Errors are logged to TFISH_ERROR_LOG_PATH (default is /trust_path/log/tuskfish_log.txt). For debugging purpose you can reverse the comment status of the last two lines to display errors on screen. Be aware, however, that this will prevent script execution from halting when an error is triggered, which has security implications. You must therefore CLOSE your site via the admin preferences before doing this. Comment the lines back out before re-opening your site.

Parameters

$errno
The level of the error raised.
$error
The error message.
$file
Name of the file where the error occurred.
$line
Line number the error was raised at.

Returns

boolean
Returns false to halt script execution.

Properties summary

protected $validator
#
Tuskfish API V1.1.1 API documentation generated by ApiGen