Keychain
Extends RegistryKeychain Class
since |
1.0 |
---|---|
package |
Joomla Framework |
Methods
__clone
Magic function to clone the registry object.
__clone() : void
since |
1.0.0 |
---|
__construct
Constructor
__construct(mixed data = null, string separator = '.') : mixed
since |
1.0.0 |
---|
Arguments
- data
mixed
The data to bind to the new Registry object.- separator
string
The path separator, and empty string will flatten the registry.
Response
mixed
__get
Magic method to access separator property.
__get(string name) : string|null
since | |
---|---|
deprecated |
3.0 This is a B/C proxy for deprecated read accesses |
Arguments
- name
string
The name of the property.
Response
string|null
A value if the property name is valid, null otherwise.
__set
Magic method to access separator property.
__set(string name, mixed value) : void
since | |
---|---|
deprecated |
3.0 This is a B/C proxy for deprecated read accesses |
Arguments
- name
string
The name of the property.- value
mixed
The value of the property.
__toString
Magic function to render this object as a string using default args of toString method.
__toString() : string
since |
1.0.0 |
---|
Response
string
append
Append value to a path in registry
append(string path, mixed value) : mixed
since |
1.4.0 |
---|
Arguments
- path
string
Parent registry Path (e.g. joomla.content.showauthor)- value
mixed
Value of entry
Response
mixed
The value of the that has been set.
asArray
Method to recursively convert an object of data to an array.
asArray(object data) : array
since |
1.0.0 |
---|
Arguments
- data
object
An object of data to return as an array.
Response
array
Array representation of the input object.
bindData
Method to recursively bind data to a parent object.
bindData(object parent, mixed data, bool recursive = true, bool allowNull = true) : void
since |
1.0.0 |
---|
Arguments
- parent
object
The parent object on which to attach the data values.- data
mixed
An array or object of data to bind to the parent object.- recursive
bool
True to support recursive bindData.- allowNull
bool
True to allow null values.
count
Count elements of the data object
count() : int
link | |
---|---|
since |
1.3.0 |
Response
int
The custom count as an integer.
def
Sets a default value if not already assigned.
def(string key, mixed default = '') : mixed
since |
1.0.0 |
---|
Arguments
- key
string
The name of the parameter.- default
mixed
An optional value for the parameter.
Response
mixed
The value set, or the default if the value was not previously set (or null).
exists
Check if a registry path exists.
exists(string path) : bool
since |
1.0.0 |
---|
Arguments
- path
string
Registry path (e.g. joomla.content.showauthor)
Response
bool
extract
Method to extract a sub-registry from path
extract(string path) : \Joomla\Registry\Registry
since |
1.2.0 2.0.0 |
---|
Arguments
- path
string
Registry path (e.g. joomla.content.showauthor)
Response
\Joomla\Registry\Registry
Registry object (empty if no data is present)
flatten
Dump to one dimension array.
flatten(string separator = null) : string[]
since |
1.3.0 |
---|
Arguments
- separator
string
The key separator.
Response
string[]
Dumped array.
get
Get a registry value.
get(string path, mixed default = null) : mixed
since |
1.0.0 |
---|
Arguments
- path
string
Registry path (e.g. joomla.content.showauthor)- default
mixed
Optional default value, returned if the internal value is null.
Response
mixed
Value of entry or null
getIterator
Gets this object represented as an ArrayIterator.
getIterator() : \ArrayIterator
This allows the data properties to be accessed via a foreach statement.
see | IteratorAggregate::getIterator() |
---|---|
since |
1.3.0 |
Response
\ArrayIterator
This object represented as an ArrayIterator.
jsonSerialize
Implementation for the JsonSerializable interface.
jsonSerialize() : object
Allows us to pass Registry objects to json_encode.
since |
1.0.0 |
---|---|
note |
The interface is only present in PHP 5.4 and up. |
Response
object
loadArray
Load an associative array of values into the default namespace
loadArray(array array, bool flattened = false, string separator = null) : $this
since |
1.0.0 2.0.0 |
---|
Arguments
- array
array
Associative array of value to load- flattened
bool
Load from a one-dimensional array- separator
string
The key separator
Response
$this
loadFile
Load the contents of a file into the registry
loadFile(string file, string format = 'JSON', array options = []) : $this
since |
1.0.0 2.0.0 |
---|
Arguments
- file
string
Path to file to load- format
string
Format of the file [optional: defaults to JSON]- options
array
Options used by the formatter
Response
$this
loadKeychain
Load a keychain file into this object.
loadKeychain(string keychainFile) : $this
since |
1.0 |
---|---|
throws |
|
Arguments
- keychainFile
string
Path to the keychain file.
Response
$this
loadObject
Load the public variables of the object into the default namespace.
loadObject(object object) : $this
since |
1.0.0 |
---|
Arguments
- object
object
The object holding the publics to load
Response
$this
loadString
Load a string into the registry
loadString(string data, string format = 'JSON', array options = []) : $this
since |
1.0.0 2.0.0 |
---|
Arguments
- data
string
String to load into the registry- format
string
Format of the string- options
array
Options used by the formatter
Response
$this
merge
Merge a Registry object into this one
merge(\Joomla\Registry\Registry source, bool recursive = false) : $this
since |
1.0.0 2.0.0 |
---|
Arguments
- source
\Joomla\Registry\Registry
Source Registry object to merge.- recursive
bool
True to support recursive merge the children values.
Response
$this
offsetExists
Checks whether an offset exists in the iterator.
offsetExists(mixed offset) : bool
since |
1.0.0 |
---|
Arguments
- offset
mixed
The array offset.
Response
bool
True if the offset exists, false otherwise.
offsetGet
Gets an offset in the iterator.
offsetGet(mixed offset) : mixed
since |
1.0.0 |
---|
Arguments
- offset
mixed
The array offset.
Response
mixed
The array value if it exists, null otherwise.
offsetSet
Sets an offset in the iterator.
offsetSet(mixed offset, mixed value) : void
since |
1.0.0 |
---|
Arguments
- offset
mixed
The array offset.- value
mixed
The array value.
offsetUnset
Unsets an offset in the iterator.
offsetUnset(mixed offset) : void
since |
1.0.0 |
---|
Arguments
- offset
mixed
The array offset.
remove
Delete a registry value
remove(string path) : mixed
since |
1.6.0 |
---|
Arguments
- path
string
Registry Path (e.g. joomla.content.showauthor)
Response
mixed
The value of the removed node or null if not set
saveKeychain
Save this keychain to a file.
saveKeychain(string keychainFile) : bool
since |
1.0 |
---|---|
throws |
|
Arguments
- keychainFile
string
The path to the keychain file.
Response
bool
Result of storing the file.
set
Set a registry value.
set(string path, mixed value, string separator = null) : mixed
since |
1.0.0 |
---|---|
deprecated |
The $separator parameter will be removed in version 4. |
Arguments
- path
string
Registry Path (e.g. joomla.content.showauthor)- value
mixed
Value of entry- separator
string
The key separator
Response
mixed
The value of the that has been set.
toArray
Transforms a namespace to an array
toArray() : array
since |
1.0.0 |
---|
Response
array
An associative array holding the namespace data
toFlatten
Method to recursively convert data to one dimension array.
toFlatten(string separator = null, array|object data = null, array &array = [], string prefix = '') : void
since |
1.3.0 2.0.0 |
---|
Arguments
- separator
string
The key separator.- data
array|object
Data source of this scope.- array
array
The result array, it is passed by reference.- prefix
string
Last level key prefix.
toObject
Transforms a namespace to an object
toObject() : object
since |
1.0.0 |
---|
Response
object
An an object holding the namespace data
toString
Get a namespace in a given string format
toString(string format = 'JSON', array options = []) : string
since |
1.0.0 |
---|
Arguments
- format
string
Format to return the string in- options
array
Parameters used by the formatter, see formatters for more info
Response
string
Namespace in string format
Properties
crypt
The encryption handler.
since |
2.0.0 |
---|
Type(s)
\Joomla\Crypt\Crypt
data
Registry Object
since |
1.0.0 |
---|
Type(s)
\stdClass
initialized
Flag if the Registry data object has been initialized
since |
1.5.2 |
---|
Type(s)
bool
separator
Path separator
since |
1.4.0 |
---|
Type(s)
string