Update
Extends CMSObjectUpdate class. It is used by Updater::update() to install an update. Use Updater::findUpdates() to find updates for an extension.
since |
1.7.0 |
---|---|
package |
Joomla CMS |
Methods
__construct
Class constructor, overridden in descendant classes.
__construct(mixed properties = null) : mixed
since |
1.7.0 |
---|
Arguments
- properties
mixed
Either and associative array or another object to set the initial properties of the object.
Response
mixed
__toString
Magic method to convert the object to a string gracefully.
__toString() : string
since |
1.7.0 |
---|---|
deprecated |
3.1.4 Classes should provide their own __toString() implementation. |
Response
string
The classname.
_characterData
Character Parser Function
_characterData(object parser, object data) : void
note |
This is public because its called externally. |
---|---|
since |
1.7.0 |
Arguments
- parser
object
Parser object.- data
object
The data.
_endElement
Callback for closing the element
_endElement(object parser, string name) : void
note |
This is public because it is called externally |
---|---|
since |
1.7.0 |
Arguments
- parser
object
Parser object- name
string
Name of element that was closed
_getLastTag
Get the last position in stack count
_getLastTag() : string
since |
1.7.0 |
---|
Response
string
_getStackLocation
Gets the reference to the current direct parent
_getStackLocation() : string
since |
1.7.0 |
---|
Response
string
_startElement
XML Start Element callback
_startElement(object parser, string name, array attrs = array()) : void
note |
This is public because it is called externally |
---|---|
since |
1.7.0 |
Arguments
- parser
object
Parser object- name
string
Name of the tag found- attrs
array
Attributes of the tag
def
Sets a default value if not already assigned
def(string property, mixed default = null) : mixed
since |
1.7.0 |
---|
Arguments
- property
string
The name of the property.- default
mixed
The default value.
Response
mixed
get
Returns a property of the object or the default value if the property is not set.
get(string property, mixed default = null) : mixed
since |
1.7.0 |
---|---|
see | CMSObject::getProperties() |
Arguments
- property
string
The name of the property.- default
mixed
The default value.
Response
mixed
The value of the property.
getError
Get the most recent error message.
getError(int i = null, bool toString = true) : string
since |
1.7.0 |
---|---|
deprecated |
3.1.4 JError has been deprecated |
Arguments
- i
int
Option error index.- toString
bool
Indicates if Exception objects should return their error message.
Response
string
Error message
getErrors
Return all errors, if any.
getErrors() : array
since |
1.7.0 |
---|---|
deprecated |
3.1.4 JError has been deprecated |
Response
array
Array of error messages.
getProperties
Returns an associative array of object properties.
getProperties(bool public = true) : array
since |
1.7.0 |
---|---|
see | CMSObject::get() |
Arguments
- public
bool
If true, returns only the public properties.
Response
array
loadFromXml
Loads an XML file from a URL.
loadFromXml(string url, int minimumStability = Updater::STABILITY_STABLE) : bool
since |
1.7.0 |
---|
Arguments
- url
string
The URL.- minimumStability
int
The minimum stability required for updating the extension {@see \Joomla\CMS\Updater\Updater}
Response
bool
True on success
set
Modifies a property of the object, creating it if it does not already exist.
set(string property, mixed value = null) : mixed
since |
1.7.0 |
---|
Arguments
- property
string
The name of the property.- value
mixed
The value of the property to set.
Response
mixed
Previous value of the property.
setError
Add an error message.
setError(string error) : void
since |
1.7.0 |
---|---|
deprecated |
3.1.4 JError has been deprecated |
Arguments
- error
string
Error message.
setProperties
Set the object properties based on a named array/hash.
setProperties(mixed properties) : bool
since |
1.7.0 |
---|---|
see | CMSObject::set() |
Arguments
- properties
mixed
Either an associative array or another object.
Response
bool
stabilityTagToInteger
Converts a tag to numeric stability representation. If the tag doesn't represent a known stability level (one of dev, alpha, beta, rc, stable) it is ignored.
stabilityTagToInteger(string tag) : int
since |
3.4 |
---|
Arguments
- tag
string
The tag string, e.g. dev, alpha, beta, rc, stable
Response
int
Properties
currentUpdate
Object containing the current update data
since |
3.0.0 |
---|
Type(s)
\stdClass
latest
Object containing the latest update data
since |
3.0.0 |
---|
Type(s)
\stdClass
minimum_stability
The minimum stability required for updates to be taken into account. The possible values are: 0 dev Development snapshots, nightly builds, pre-release versions and so on 1 alpha Alpha versions (work in progress, things are likely to be broken) 2 beta Beta versions (major functionality in place, show-stopper bugs are likely to be present) 3 rc Release Candidate versions (almost stable, minor bugs might be present) 4 stable Stable versions (production quality code)
compatibleVersions
Array with compatible versions used by the pre-update check
_errors
An array of error messages or Exception objects.