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 CMSObject
+ Graphe d'héritage de CMSObject:

Fonctions membres publiques

 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 

Attributs protégés

 $_errors = array()
 

Description détaillée

Joomla Platform Object Class

This class allows for simple but smart objects with get and set methods and an internal error handler.

Depuis
1.7.0
Obsolète:
4.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $properties = null)

Class constructor, overridden in descendant classes.

Paramètres
mixed$propertiesEither and associative array or another object to set the initial properties of the object.
Depuis
1.7.0

Références null.

Documentation des fonctions membres

◆ __toString()

__toString ( )

Magic method to convert the object to a string gracefully.

Renvoie
string The classname.
Depuis
1.7.0
Obsolète:
12.3 Classes should provide their own __toString() implementation.

◆ def()

def (   $property,
  $default = null 
)

Sets a default value if not already assigned

Paramètres
string$propertyThe name of the property.
mixed$defaultThe default value.
Renvoie
mixed
Depuis
1.7.0

Références $default, et $value.

◆ get()

get (   $property,
  $default = null 
)

Returns a property of the object or the default value if the property is not set.

Paramètres
string$propertyThe name of the property.
mixed$defaultThe default value.
Renvoie
mixed The value of the property.
Depuis
1.7.0
Voir également
CMSObject::getProperties()

Références $default.

Référencé par MediaHelper\getContentTypeLink().

◆ getError()

getError (   $i = null,
  $toString = true 
)

Get the most recent error message.

Paramètres
integer$iOption error index.
boolean$toStringIndicates if JError objects should return their error message.
Renvoie
string Error message
Depuis
1.7.0
Voir également
JError
Obsolète:
12.3 JError has been deprecated

Références $i, elseif, et null.

◆ getErrors()

getErrors ( )

Return all errors, if any.

Renvoie
array Array of error messages or JErrors.
Depuis
1.7.0
Voir également
JError
Obsolète:
12.3 JError has been deprecated

◆ getProperties()

getProperties (   $public = true)

Returns an associative array of object properties.

Paramètres
boolean$publicIf true, returns only the public properties.
Renvoie
array
Depuis
1.7.0
Voir également
CMSObject::get()

Références $key, et $value.

◆ set()

set (   $property,
  $value = null 
)

Modifies a property of the object, creating it if it does not already exist.

Paramètres
string$propertyThe name of the property.
mixed$valueThe value of the property to set.
Renvoie
mixed Previous value of the property.
Depuis
1.7.0

Références $value, et null.

◆ setError()

setError (   $error)

Add an error message.

Paramètres
string$errorError message.
Renvoie
void
Depuis
1.7.0
Voir également
JError
Obsolète:
12.3 JError has been deprecated

◆ setProperties()

setProperties (   $properties)

Set the object properties based on a named array/hash.

Paramètres
mixed$propertiesEither an associative array or another object.
Renvoie
boolean
Depuis
1.7.0
Voir également
CMSObject::set()

Documentation des champs

◆ $_errors

$_errors = array()
protected

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