Hello, i am trying to mike a component for joomla 1.5 and as i hate to reload the page on every single clic i need to make it dinamic with the use of JSON and ajax. But i cant get it to work. I cant get a way to output a document without html. Json Extends Joomla CMS Input Input. Input JSON Class. This class decodes a JSON string from the raw request data and makes it available via the.
Extends JoomlaInputInputJoomla! Input JSON Class
This class decodes a JSON string from the raw request data and makes it available viathe standard Input interface.
since | 1.0 |
---|
Methods
__call
Magic method to get filtered input data.
since | 1.0 |
---|
Arguments
string
Name of the filter type prefixed with 'get'.array
[0] The name of the variable [1] The default value.Json Joomla Login
Response
mixed
The filtered input value.__construct
Constructor.
since | 1.0 |
---|
Arguments
array
Optional source data. If omitted, a copy of the server variable '_REQUEST' is used.array
An optional associative array of configuration parameters:filter: An instance of FilterInput. If omitted, a default filter is initialised.__get
Magic method to get an input object
since | 1.0 |
---|
Arguments
mixed
Name of the input object to retrieve.Response
JoomlaInputInput
The request input objectcount
Get the number of variables.
since | 1.0 |
---|---|
see | JoomlaInputCountable::count() |
Response
integer
The number of variables in the input.def
Define a value. The value will only be set if there's no value for the name or if it is null.
since | 1.0 |
---|
Arguments
How to test your internet connection speed.
string
Name of the value to define.mixed
Value to assign to the input.exists
Check if a value name exists.
since | 1.2.0 |
---|
Arguments
string
Value nameResponse
boolean
get
Gets a value from the input data.
see | JoomlaFilterInputFilter::clean() |
---|---|
since | 1.0 |
Arguments
string
Name of the value to get.mixed
Default value to return if variable does not exist.string
Filter to apply to the value.Response
mixed
The filtered input value.getAlnum
Arguments
mixed
=
Response
string
getArray
Gets an array of values from the request.
since | 1.0 |
---|
Arguments
array
Associative array of keys and filter types to apply.If empty and datasource is null, all the input data will be returnedbut filtered using the default case in JFilterInput::clean.mixed
Array to retrieve data from, or nullResponse
mixed
The filtered input data.getBase64
Arguments
mixed
=
Response
string
getBool
Arguments
![Joomla Joomla](/uploads/1/3/7/1/137178778/556145806.png)
mixed
=
Response
boolean
getCmd
Arguments
mixed
=
Response
string
getFloat
Arguments
mixed
=
Response
float
getHtml
Arguments
mixed
=
Response
string
getInputForRequestMethod
Get the Input instance holding the data for the current request method
since | 1.3.0 |
---|
Response
getInt
Arguments
mixed
=
Response
integer
getMethod
Jason Jo Mila
Gets the request method.
since | 1.0 |
---|
Response
string
The request method.getPath
Arguments
mixed
=
Response
string
getRaw
Gets the raw JSON string from the request.
since | 1.0 |
---|
Response
string
The raw JSON string from the request.getString
Arguments
mixed
=
Response
string
getUint
Arguments
mixed
=
Response
integer
getUsername
Arguments
mixed
=
Response
string
getWord
Arguments
mixed
=
Response
string
loadAllInputs
Method to load all of the global inputs.
since | 1.0 |
---|
serialize
Method to serialize the input.
since | 1.0 |
---|
Response
string
The serialized input.set
Sets a value
since | 1.0 |
---|
Arguments
string
Name of the value to set.mixed
Value to assign to the input.unserialize
Method to unserialize the input.
since | 1.0 |
---|
Arguments
string
The serialized input.Properties
raw
The raw JSON string from the request.
allowedGlobals
Container with allowed superglobals
since | 1.3.0 |
---|---|
note | Once PHP 7.1 is the minimum supported version this should become a private constant |
Type(s)
array
options
Options array for the Input instance.
since | 1.0 |
---|
Type(s)
array
filter
Filter object to use.
since | 1.0 |
---|
Type(s)
JoomlaFilterInputFilter
data
Input data.
![Joomla json api Joomla json api](/uploads/1/3/7/1/137178778/231061586.jpg)
since | 1.0 |
---|
Type(s)
array
inputs
Input objects
since | 1.0 |
---|
Type(s)
array<mixed,JoomlaInputInput>
loaded
Is all GLOBAL added
since | 1.1.4 |
---|
Type(s)
boolean
get
Type(s)
JoomlaInputInput
post
Type(s)
JoomlaInputInput
request
Type(s)
JoomlaInputInput
server
Type(s)
JoomlaInputInput
env
Type(s)
JoomlaInputInput
files
Type(s)
JoomlaInputFiles
cookie
Type(s)
JoomlaInputCookie
The VEL API is a JSON-formatted feed of extensions on the VEL live and resolved lists. It can be accessed at https://extensions.joomla.org/index.php?option=com_vel&format=json . There is also a verification hash at https://extensions.joomla.org/index.php?option=com_vel&format=json&task=verify . There are also two shortcuts available:-
The verification hash updates when the feed updates, so plugins can use this to check whether it is necessary to fetch an updated version of the feed. Please do use this check first.
Note that the feed and its data are licensed under the GPL, and may be used in any way compatible with the GPL, including being used in commercial plugins. We will however take a dim view of anyone charging their clients to access the data, for example.
Format of the Response
The response is compatible with the standard Joomla JSON response to an AJAX request, as described here: https://docs.joomla.org/JSON_Responses_with_JResponseJson and consists of two properties:-
- success: true
- data: the actual response data, either a JSON-formatted feed, or a single string verification hash, depending on whether task=verify has been set in the URL parameters.
Format of the Feed
The feed has the following properties:-
- api_version
- api_version_name
- timestamp: when the feed was last updated, according to ISO8601 specification
- license: note that the feed data is licensed under the GPL
- items: array of extension listings
Format of the Feed Items
- id: the id of the listing
- title: the name of the listing, usually the extension name plus vulnerable versions
- description: includes information that cannot be easily put in other fields, eg if version numbers do not correspond to standard version conventions this can be explained here
- status: 1 = live, 2 = resolved
- jed: url of jed listing if any
- cve_id: CVE and/or other vulnerability tracking database IDs
- cwe_id: CWE vulnerability classification IDs
- risk level: eg low, medium, high
- recommendation: this field is used to give recommendation to the end user how to handle the subject extension, eg to update
- cvss30_base: cvss 3.0 base vector string see https://www.first.org/cvss/calculator/3.0
- cvss30_base_score: cvss 3.0 numeric score
- start_version: starting extension version where vulnerability is present, will be empty if all previous versions are likely to be vulnerable
- vulnerable_version: most recent version known to be vulnerable
- patch_version: version where vulnerability is patched, will be empty if no patch available
- update_notice: url of developer's update notice, if any
- install_data: json fomatted installation data from extension installation manifest, including name, type, creationDate, author, authorUrl, copyright, version and group (for plugins). This can be used to distinguish extensions with similar names, note that we don't include the author email
- created: ISO8601 creation date of the listing
- modified: ISO8601 modification date of the listing
- statusText: 'Live', or 'Resolved'
Calculating the Verification Hash
If you wish to use the verification hash to verify the data do the following:-
- json_encode the feed data
- remove all spaces, tabs and returns
- calculate the sha256 hash
Compare with the value returned by the URL https://extensions.joomla.org/index.php?option=com_vel&format=json&task=verify