Tuskfish API
  • Package
  • Class

Packages

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

Classes

  • TfishAncestralObject
  • TfishAngryTree
  • TfishCache
  • TfishFileHandler
  • TfishLogger
  • TfishPreference
  • TfishPreferenceHandler

Functions

  • tfish_autoload

Class TfishPreference

Holds Tuskfish site configuration data.

A preference object is automatically instantiated on every page via tfish_header.php.

TfishAncestralObject
Extended by TfishPreference
Package: core
Copyright: Simon Wilkinson 2013-2017 (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Located at trust_path/libraries/tuskfish/class/TfishPreference.php

Methods summary

public
# __construct( )

Initialise default properties.

Initialise default properties.

public string
# escape( string $property )

Escape a property for on-screen display to prevent XSS.

Escape a property for on-screen display to prevent XSS.

Applies htmlspecialchars() to a property destined for display to mitigate XSS attacks. Note that preference values should not be directly assigned to meta tags; they should be assigned to $tfish_metadata instead, which will handle any escaping necessary.

Parameters

$property
Name of property.

Returns

string
Value of property escaped for display.
public static array
# readPreferences( )

Read out the site preferences into an array.

Read out the site preferences into an array.

Returns

array
Array of site preferences.
public
# __set( string $property, mixed $value )

Set the value of a whitelisted property.

Set the value of a whitelisted property.

Intercepts direct calls to set the value of object properties. Imposes data type restrictions and range checks before allowing the properties to be set.

Parameters

$property
Name of property.
$value
Value of property.

Overrides

TfishAncestralObject::__set
public
# updatePreferences( array $dirty_input )

Update the preference object.

Update the preference object.

The preference object will conduct its own internal data type validation and range checks.

Parameters

$dirty_input
Usually $_REQUEST data.

Methods inherited from TfishAncestralObject

__get(), __isset(), __unset(), getPropertyWhitelist(), toArray()

Properties summary

Properties inherited from TfishAncestralObject

$__data, $__properties

Magic properties

public string $site_name

Name of website.

public string $site_description

Meta description of website.

public string $site_author

Author of website.

public string $site_email

Administrative contact email for website.

public string $site_copyright

Copyright notice.

public integer $close_site

Toggle to close this site.

public string $server_timezone

Timezone of server location.

public string $site_timezone

Timezone for main audience location.

public integer $min_search_length

Minimum length of search terms.

Tuskfish API API documentation generated by ApiGen