Tuskfish API V1.1.2
  • Package
  • Class

Packages

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

Classes

  • TfCache
  • TfFileHandler
  • TfLogger
  • TfMetadata
  • TfPaginationControl
  • TfPreference
  • TfPreferenceHandler
  • TfTemplate
  • TfTree

Traits

  • TfLanguage
  • TfMagicMethods
  • TfMimetypes
  • TfRights

Functions

  • checkPasswordStrength
  • hashPassword
  • tf_autoload
  • tfContentModuleAutoload

Class TfMetadata

Provides page-level metadata.

User-facing controller scripts can override the site-level defaults by uncommenting the options at the bottom of each file. A good example of this is when viewing a single content object; if it has the metaTitle and metaDescription fields set you can assign those to this object in order to customise the page title and description to the object, thereby improving your SEO.

TfMetadata uses TfMagicMethods
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
Uses: trait TfMagicMethods Prevents direct setting of properties / unlisted properties.
Located at trust_path/libraries/tuskfish/class/TfMetadata.php

Methods summary

public
# __construct( TfValidator $validator, TfPreference $preference )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.
$preference
Instance of TfPreference, holding site preferences.
public string|boolean
# __get( string $property )

Access an existing property and escape it for output to browser.

Access an existing property and escape it for output to browser.

Parameters

$property
Name of property.

Returns

string|boolean

Value of preference escaped for display if set, otherwise false.

Note that the ENT_QUOTES flag must be set on htmlspecialchars() as these properties are used within attributes of meta tags, so a double quote would cause breakage.

public
# setTitle( string $value )

Sets the page meta title property.

Sets the page meta title property.

Parameters

$value
Page title.
public
# setDescription( string $value )

Sets the meta description property.

Sets the meta description property.

Parameters

$value
Page description.
public
# setAuthor( string $value )

Sets the page meta author property.

Sets the page meta author property.

Parameters

$value
Page author.
public
# setCopyright( string $value )

Sets the page meta copyright property.

Sets the page meta copyright property.

Parameters

$value
Page copyright.
public
# setGenerator( string $value )

Sets the meta generatorf (software used) property, which is not used in the default theme.

Sets the meta generatorf (software used) property, which is not used in the default theme.

Parameters

$value
Site generator.
public
# setSeo( string $value )

Sets the SEO-friendly URL string for this page.

Sets the SEO-friendly URL string for this page.

Parameters

$value
SEO string.
public
# setRobots( string $value )

Sets the meta robots directive for this page.

Sets the meta robots directive for this page.

Parameters

$value
Robots directive.

Methods used from TfMagicMethods

__isset(), __set(), __unset()

Properties summary

protected $validator
#
protected $preference
#
protected string $title
# ''
protected string $description
# ''
protected string $author
# ''
protected string $copyright
# ''
protected string $generator
# ''
protected string $seo
# ''
protected string $robots
# ''

Magic properties

public TfValidator $validator

Instance of the Tuskfish data validator class.

public TfPreference $preference

Instance of Tuskfish site preferences class.

public string $title

Meta title of this website.

public string $description

Meta description of this website.

public string $author

Author of this website.

public string $copyright

Copyright notice.

public string $generator

Software system that generated this page.

public string $seo

SEO optimisation string to append to page URL.

public string $robots

Meta instructions to robots.

public integer $paginationElements

Number of slots in the pagination control.

Tuskfish API V1.1.2 API documentation generated by ApiGen