Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Microdata

Fonctions membres publiques

 __construct ($type='', $flag=true)
 
 enable ($flag=true)
 
 isEnabled ()
 
 setType ($type)
 
 getType ()
 
 property ($property)
 
 getProperty ()
 
 content ($content, $machineContent=null)
 
 getContent ()
 
 getMachineContent ()
 
 fallback ($type, $property)
 
 getFallbackType ()
 
 getFallbackProperty ()
 
 display ($displayType='', $emptyOutput=false)
 
 displayScope ()
 

Fonctions membres publiques statiques

static sanitizeType ($type)
 
static sanitizeProperty ($property)
 
static getTypes ()
 
static getAvailableTypes ()
 
static getExpectedTypes ($type, $property)
 
static isPropertyInType ($type, $property)
 
static isTypeAvailable ($type)
 
static htmlMeta ($content, $property, $scope='', $invert=false)
 
static htmlSpan ($content, $property='', $scope='', $invert=false)
 
static htmlDiv ($content, $property='', $scope='', $invert=false)
 
static htmlTag ($tag, $content, $property='', $scope='', $invert=false)
 
static htmlScope ($scope)
 
static htmlProperty ($property)
 

Fonctions membres protégées

 resetParams ()
 

Fonctions membres protégées statiques

static loadTypes ()
 
static getExpectedDisplayType ($type, $property)
 

Attributs protégés

 $type = null
 
 $property = null
 
 $content = null
 
 $machineContent = null
 
 $fallbackType = null
 
 $fallbackProperty = null
 
 $enabled = true
 

Attributs protégés statiques

static $types = null
 

Description détaillée

Joomla Platform class for interacting with Microdata semantics.

Depuis
3.2

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $type = '',
  $flag = true 
)

Initialize the class and setup the default $Type

Paramètres
string$typeOptional, fallback to 'Thing' Type
boolean$flagEnable or disable the library output
Depuis
3.2

Références $type.

Documentation des fonctions membres

◆ content()

content (   $content,
  $machineContent = null 
)

Setup a Human content or content for the Machines

Paramètres
string$contentThe human content or machine content to be used
string$machineContentThe machine content
Renvoie
Microdata Instance of $this
Depuis
3.2

Références $content, et content.

◆ display()

display (   $displayType = '',
  $emptyOutput = false 
)

This function handles the display logic. It checks if the Type, Property are available, if not check for a Fallback, then reset all params for the next use and return the HTML.

Paramètres
string$displayTypeOptional, 'inline', available options ['inline'|'span'|'div'|meta]
boolean$emptyOutputReturn an empty string if the library output is disabled and there is a $content value
Renvoie
string
Depuis
3.2

Références $content, $html, content, elseif, et null.

◆ displayScope()

displayScope ( )

Return the HTML of the current Scope

Renvoie
string
Depuis
3.2

◆ enable()

enable (   $flag = true)

Enable or Disable the library output

Paramètres
boolean$flagEnable or disable the library output
Renvoie
Microdata Instance of $this
Depuis
3.2

◆ fallback()

fallback (   $type,
  $property 
)

Setup a Fallback Type and Property

Paramètres
string$typeThe Fallback Type
string$propertyThe Fallback Property
Renvoie
Microdata Instance of $this
Depuis
3.2

Références $type, et null.

◆ getAvailableTypes()

static getAvailableTypes ( )
static

Return an array with all available Types from the http://schema.org vocabulary

Renvoie
array
Depuis
3.2

◆ getContent()

getContent ( )

Return the current $content

Renvoie
string
Depuis
3.2

Références $content.

◆ getExpectedDisplayType()

static getExpectedDisplayType (   $type,
  $property 
)
staticprotected

Return the expected display type: [normal|nested|meta] In which way to display the Property: normal -> itemprop="name" nested -> itemprop="director" itemscope itemtype="https://schema.org/Person" meta -> <meta itemprop="datePublished" content="1991-05-01">

Paramètres
string$typeThe Type where to find the Property
string$propertyThe Property to process
Renvoie
string
Depuis
3.2

Références $type.

◆ getExpectedTypes()

static getExpectedTypes (   $type,
  $property 
)
static

Return the expected Types of the given Property

Paramètres
string$typeThe Type to process
string$propertyThe Property to process
Renvoie
array
Depuis
3.2

Références $tmp, et $type.

◆ getFallbackProperty()

getFallbackProperty ( )

Return the current $fallbackProperty

Renvoie
string
Depuis
3.2

◆ getFallbackType()

getFallbackType ( )

Return the current $fallbackType

Renvoie
string
Depuis
3.2

◆ getMachineContent()

getMachineContent ( )

Return the current $machineContent

Renvoie
string
Depuis
3.3

◆ getProperty()

getProperty ( )

Return the current $Property name

Renvoie
string
Depuis
3.2

◆ getType()

getType ( )

Return the current $Type name

Renvoie
string
Depuis
3.2

Références $type.

◆ getTypes()

static getTypes ( )
static

Return an array with all available Types and Properties from the http://schema.org vocabulary

Renvoie
array
Depuis
3.2

◆ htmlDiv()

static htmlDiv (   $content,
  $property = '',
  $scope = '',
  $invert = false 
)
static

Return Microdata semantics in a <div> tag.

Paramètres
string$contentThe human content
string$propertyOptional, the human content to display
string$scopeOptional, the Type scope to display
boolean$invertOptional, default = false, invert the $scope with the $property
Renvoie
string
Depuis
3.2

Références $content.

◆ htmlMeta()

static htmlMeta (   $content,
  $property,
  $scope = '',
  $invert = false 
)
static

Return Microdata semantics in a <meta> tag with content for machines.

Paramètres
string$contentThe machine content to display
string$propertyThe Property
string$scopeOptional, the Type scope to display
boolean$invertOptional, default = false, invert the $scope with the $property
Renvoie
string
Depuis
3.2

Références $content.

◆ htmlProperty()

static htmlProperty (   $property)
static

Return the HTML Property

Paramètres
string$propertyThe Property to process
Renvoie
string
Depuis
3.2

◆ htmlScope()

static htmlScope (   $scope)
static

Return the HTML Scope

Paramètres
string$scopeThe Scope to process
Renvoie
string
Depuis
3.2

◆ htmlSpan()

static htmlSpan (   $content,
  $property = '',
  $scope = '',
  $invert = false 
)
static

Return Microdata semantics in a <span> tag.

Paramètres
string$contentThe human content
string$propertyOptional, the human content to display
string$scopeOptional, the Type scope to display
boolean$invertOptional, default = false, invert the $scope with the $property
Renvoie
string
Depuis
3.2

Références $content.

◆ htmlTag()

static htmlTag (   $tag,
  $content,
  $property = '',
  $scope = '',
  $invert = false 
)
static

Return Microdata semantics in a specified tag.

Paramètres
string$tagThe HTML tag
string$contentThe human content
string$propertyOptional, the human content to display
string$scopeOptional, the Type scope to display
boolean$invertOptional, default = false, invert the $scope with the $property
Renvoie
string
Depuis
3.3

Références $content, et $tmp.

◆ isEnabled()

isEnabled ( )

Return 'true' if the library output is enabled

Renvoie
boolean
Depuis
3.2

Références $enabled.

◆ isPropertyInType()

static isPropertyInType (   $type,
  $property 
)
static

Recursive function, control if the given Type has the given Property

Paramètres
string$typeThe Type where to check
string$propertyThe Property to check
Renvoie
boolean
Depuis
3.2

Références $type.

◆ isTypeAvailable()

static isTypeAvailable (   $type)
static

Control if the given Type class is available

Paramètres
string$typeThe Type to check
Renvoie
boolean
Depuis
3.2

Références $type, et true.

◆ loadTypes()

static loadTypes ( )
staticprotected

Load all available Types and Properties from the http://schema.org vocabulary contained in the types.json file

Renvoie
void
Depuis
3.2

Références $path.

◆ property()

property (   $property)

Setup a $Property

Paramètres
string$propertyThe Property
Renvoie
Microdata Instance of $this
Depuis
3.2

◆ resetParams()

resetParams ( )
protected

Reset all params

Renvoie
void
Depuis
3.2

Références content, et null.

◆ sanitizeProperty()

static sanitizeProperty (   $property)
static

Return the sanitized $Property

Paramètres
string$propertyThe Property to sanitize
Renvoie
string
Depuis
3.2

◆ sanitizeType()

static sanitizeType (   $type)
static

Return the sanitized $Type

Paramètres
string$typeThe Type to sanitize
Renvoie
string
Depuis
3.2

Références $type.

◆ setType()

setType (   $type)

Set a new http://schema.org Type

Paramètres
string$typeThe $Type to be setup
Renvoie
Microdata Instance of $this
Depuis
3.2

Références $type.

Documentation des champs

◆ $content

$content = null
protected

◆ $enabled

$enabled = true
protected

◆ $fallbackProperty

$fallbackProperty = null
protected

◆ $fallbackType

$fallbackType = null
protected

◆ $machineContent

$machineContent = null
protected

◆ $property

$property = null
protected

◆ $type

$type = null
protected

◆ $types

$types = null
staticprotected

La documentation de cette classe a été générée à partir du fichier suivant :