Tuskfish API V1.1.2
  • Package
  • Class

Packages

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

Classes

  • TfArticle
  • TfAudio
  • TfBlock
  • TfBlockHandler
  • TfCollection
  • TfCollectionHandler
  • TfContentControllerFactory
  • TfContentHandler
  • TfContentHandlerFactory
  • TfContentObject
  • TfContentObjectController
  • TfDownload
  • TfImage
  • TfRss
  • TfSearchContent
  • TfStatic
  • TfTag
  • TfTagHandler
  • TfTaglinkHandler
  • TfVideo

Traits

  • TfContentTypes

Class TfImage

Represents an image such as a photograph or illustration.

TfContentObject uses TfLanguage, TfMagicMethods, TfMimetypes, TfRights
Extended by TfImage
Package: content
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 TfLanguage to obtain a list of available translations.
Uses: trait TfMagicMethods Prevents direct setting of properties / unlisted properties.
Uses: trait TfMimetypes Access a list of known / acceptable file mimetypes.
Properties: TfValidator $validator Instance of the Tuskfish data validator class.
Properties: int $id Auto-increment, set by database.
Properties: string $type Content object type eg. TfArticle etc. [ALPHA]
Properties: string $title The name of this content.
Properties: string $teaser A short (one paragraph) summary or abstract for this content. [HTML]
Properties: string $description The full article or description of the content. [HTML]
Properties: string $media An associated download/audio/video file. [FILEPATH OR URL]
Properties: string $format Mimetype
Properties: string $fileSize Specify in bytes.
Properties: string $creator Author.
Properties: string image An associated image file, eg. a screenshot a good way to handle it. [FILEPATH OR URL]
Properties: string $caption Caption of the image file.
Properties: string $date Date of publication expressed as a string.
Properties: int $parent A source work or collection of which this content is part.
Properties: string $language Future proofing.
Properties: int $rights Intellectual property rights scheme or license under which the work is distributed.
Properties: string $publisher The entity responsible for distributing this work.
Properties: array $tags Tag IDs associated with this object; not persistent (stored as taglinks in taglinks table).
Properties: int $online Toggle object on or offline.
Properties: int $submissionTime Timestamp representing submission time.
Properties: int $counter Number of times this content was viewed or downloaded.
Properties: string $metaTitle Set a custom page title for this content.
Properties: string $metaDescription Set a custom page meta description for this content.
Properties: string $seo SEO-friendly string; it will be appended to the URL for this content.
Properties: string $handler Handler for this object (not persistent).
Properties: string $template The template that should be used to display this object (not persistent).
Properties: string $module The module that handles this content type (not persistent).
Properties: string $icon The Font Awesome icon representing this content type (not persistent).
Located at trust_path/modules/content/class/TfImage.php

Methods summary

public
# __construct( TfValidator $validator )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.

Overrides

TfContentObject::__construct
public array
# getListOfZeroedProperties( )

Returns an array of base object properties that are not used by this subclass.

Returns an array of base object properties that are not used by this subclass.

This list is also used in update calls to the database to ensure that unused columns are cleared and reset with default values.

Returns

array
Array of properties that should be zeroed (unset).

Overrides

TfContentObject::getListOfZeroedProperties
protected string
# makeDataHumanReadable( string $cleanProperty )

Converts properties to human readable form in preparation for output.

Converts properties to human readable form in preparation for output.

If you have added some custom properties to this content subclass that need to be formatted for output, add a switch above the call to the parent method. Structure it so that any case not explicitly handled will fall through to the parent method, while explicit cases will return a formatted value.

Parameters

$cleanProperty
Name of content object property to be formatted.

Returns

string
Property formatted to human readable form for output.

Overrides

TfContentObject::makeDataHumanReadable
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 an object property. This method is overridden by child classes to impose data type restrictions and range checks on custom subclass properties.

If you have added some custom properties to this content subclass that need to be type and/or range checked before permitting assignment, add a switch above the call to the parent method. Structure it so that any case not explicitly handled will fall through to the parent method, while explicit cases will be handled here.

Parameters

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

Overrides

TfMagicMethods::__set

Methods inherited from TfContentObject

convertBytesToHumanReadable(), convertObjectToArray(), escapeForXss(), getCachedImage(), getListOfAllowedAudioMimetypes(), getListOfAllowedImageMimetypes(), getListOfAllowedVideoMimetypes(), getPropertyWhitelist(), getUrl(), isValidMedia(), loadPropertiesFromArray(), setCaption(), setCounter(), setCreator(), setDate(), setDescription(), setExpiresOn(), setFileSize(), setFormat(), setHandler(), setIcon(), setId(), setImage(), setLanguage(), setLastUpdated(), setMedia(), setMetaDescription(), setMetaTitle(), setModule(), setOnline(), setParent(), setPublisher(), setRights(), setSeo(), setSubmissionTime(), setTags(), setTeaser(), setTemplate(), setTitle(), setType(), updateLastUpdated()

Methods used from TfLanguage

getListOfLanguages()

Methods used from TfMagicMethods

__get(), __isset(), __unset()

Methods used from TfMimetypes

getListOfPermittedUploadMimetypes()

Methods used from TfRights

getListOfRights()

Properties summary

Properties inherited from TfContentObject

$caption, $counter, $creator, $date, $description, $expiresOn, $fileSize, $format, $handler, $icon, $id, $image, $language, $lastUpdated, $media, $metaDescription, $metaTitle, $module, $online, $parent, $publisher, $rights, $seo, $submissionTime, $tags, $teaser, $template, $title, $type, $validator

Tuskfish API V1.1.2 API documentation generated by ApiGen