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

Trait TfMagicMethods

Allows for non-write access to protected properties and prevents non-whitelisted properties from being set.

Only to be used in classes that have a TfValidator instance as a property.

Direct Known Users

TfContentObject, TfCriteria, TfCriteriaItem, TfMetadata, TfPreference, TfRss, TfUser

Indirect Known Users

TfArticle, TfAudio, TfBlock, TfCollection, TfDownload, TfImage, TfStatic, TfTag, TfVideo

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.1
Used by: TfRss Implementation of magic methods to restrict direct property access.
Located at trust_path/libraries/tuskfish/class/TfMagicMethods.php

Methods summary

public mixed|null
# __get( string $property )

Get the value of a property.

Get the value of a property.

Intercepts direct calls to access an object property. This method can be overridden to impose processing logic to the value before returning it.

Parameters

$property
Name of property.

Returns

mixed|null
$property Value of property if it is set; otherwise null.
public boolean
# __isset( string $property )

Check if a property is set.

Check if a property is set.

Intercepts isset() calls to correctly read object properties. Prevents non-whitelisted, arbitrary properties from being set. Can be overridden in child objects to add processing logic for specific properties.

Parameters

$property
Name of property.

Returns

boolean
True if set otherwise false.
public
# __set( string $property, mixed $value )

Intercept and prevent direct setting of properties.

Intercept and prevent direct setting of properties.

Properties must be set using the relevant setter method.

Parameters

$property
Name of property.
$value
Value of property.
public boolean
# __unset( string $property )

Unsets a property.

Unsets a property.

Intercepts unset() calls to correctly unset object properties. Can be overridden in child objects to add processing logic for specific properties.

Parameters

$property
Name of property.

Returns

boolean
True on success, false on failure.
Tuskfish API V1.1.2 API documentation generated by ApiGen