JKeychain
Extends \Joomla\Registry\RegistryKeychain Class
since |
3.1.4 |
---|---|
deprecated |
4.0 Deprecated without replacement |
package |
Joomla.Platform |
Methods
__clone
Magic function to clone the registry object.
__clone() : void
since |
1.0 |
---|
__construct
Constructor
__construct(mixed $data = null)
since |
1.0 |
---|
Arguments
- $data
mixed
The data to bind to the new Registry object.
__toString
Magic function to render this object as a string using default args of toString method.
__toString() : string
since |
1.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 |
---|
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, boolean $recursive = true, boolean $allowNull = true) : void
since |
1.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
boolean
True to support recursive bindData.- $allowNull
boolean
True to allow null values.
count
count()
createPassphraseFile
Create a passphrase file
createPassphraseFile(string $passphrase, string $passphraseFile, string $privateKeyFile, string $privateKeyPassphrase) : boolean
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $passphrase
string
The passphrase to store in the passphrase file.- $passphraseFile
string
Path to the passphrase file to create.- $privateKeyFile
string
Path to the private key file to encrypt the passphrase file.- $privateKeyPassphrase
string
The passphrase for the private key.
Response
boolean
Result of writing the passphrase file to disk.
def
Sets a default value if not already assigned.
def(string $key, mixed $default = '') : mixed
since |
1.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).
deleteValue
Delete a registry value (very simple method)
deleteValue(string $path) : mixed
since |
3.1.4 |
---|
Arguments
- $path
string
Registry Path (e.g. joomla.content.showauthor)
Response
mixed
Value of old value or boolean false if operation failed
exists
Check if a registry path exists.
exists(string $path) : boolean
since |
1.0 |
---|
Arguments
- $path
string
Registry path (e.g. joomla.content.showauthor)
Response
boolean
extract
Method to extract a sub-registry from path
extract(string $path) : \Joomla\Registry\Registry|null
since |
1.2.0 |
---|
Arguments
- $path
string
Registry path (e.g. joomla.content.showauthor)
Response
\Joomla\Registry\Registry|null
Registry object if data is present
flatten
Dump to one dimension array.
flatten(string $separator = null) : array<mixed,string>
since |
1.3.0 |
---|
Arguments
- $separator
string
The key separator.
Response
array<mixed,string>
Dumped array.
get
Get a registry value.
get(string $path, mixed $default = null) : mixed
since |
1.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
getInstance
Returns a reference to a global Registry object, only creating it if it doesn't already exist.
getInstance(string $id) : \Joomla\Registry\Registry
This method must be invoked as:
$registry = Registry::getInstance($id);
since |
1.0 |
---|---|
deprecated |
2.0 Instantiate a new Registry instance instead |
Arguments
- $id
string
An ID for the registry instance
Response
\Joomla\Registry\Registry
The Registry object.
getIterator
getIterator()
getPassphraseFromFile
Get the passphrase for this keychain
getPassphraseFromFile(string $passphraseFile, string $publicKeyFile) : string
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $passphraseFile
string
The file containing the passphrase to encrypt and decrypt.- $publicKeyFile
string
The file containing the public key to decrypt the passphrase file.
Response
string
The passphrase in from passphraseFile
jsonSerialize
Return data which should be serialized by json_encode().
jsonSerialize() : mixed
Response
mixed
loadArray
Load an associative array of values into the default namespace
loadArray(array $array, boolean $flattened = false, string $separator = null) : \Joomla\Registry\Registry
since |
1.0 |
---|
Arguments
- $array
array
Associative array of value to load- $flattened
boolean
Load from a one-dimensional array- $separator
string
The key separator
Response
\Joomla\Registry\Registry
Return this object to support chaining.
loadFile
Load the contents of a file into the registry
loadFile(string $file, string $format = 'JSON', array $options = array()) : \Joomla\Registry\Registry
since |
1.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
\Joomla\Registry\Registry
Return this object to support chaining.
loadKeychain
Load a keychain file into this object.
loadKeychain(string $keychainFile, string $passphraseFile, string $publicKeyFile) : boolean
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $keychainFile
string
Path to the keychain file.- $passphraseFile
string
The path to the passphrase file to decript the keychain.- $publicKeyFile
string
The file containing the public key to decrypt the passphrase file.
Response
boolean
Result of loading the object.
loadObject
Load the public variables of the object into the default namespace.
loadObject(object $object) : \Joomla\Registry\Registry
since |
1.0 |
---|
Arguments
- $object
object
The object holding the publics to load
Response
\Joomla\Registry\Registry
Return this object to support chaining.
loadString
Load a string into the registry
loadString(string $data, string $format = 'JSON', array $options = array()) : \Joomla\Registry\Registry
since |
1.0 |
---|
Arguments
- $data
string
String to load into the registry- $format
string
Format of the string- $options
array
Options used by the formatter
Response
\Joomla\Registry\Registry
Return this object to support chaining.
merge
Merge a Registry object into this one
merge(\Joomla\Registry\Registry $source, boolean $recursive = false) : \Joomla\Registry\Registry|false
since |
1.0 |
---|
Arguments
- $source
\Joomla\Registry\Registry
Source Registry object to merge.- $recursive
boolean
True to support recursive merge the children values.
Response
\Joomla\Registry\Registry|false
Return this object to support chaining or false if $source is not an instance of Registry.
offsetExists
offsetExists( $offset)
Arguments
- $offset
offsetGet
offsetGet( $offset)
Arguments
- $offset
offsetSet
offsetSet( $offset, $value)
Arguments
- $offset
- $value
offsetUnset
offsetUnset( $offset)
Arguments
- $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, string $passphraseFile, string $publicKeyFile) : boolean
since |
3.1.4 |
---|---|
throws |
|
Arguments
- $keychainFile
string
The path to the keychain file.- $passphraseFile
string
The path to the passphrase file to encrypt the keychain.- $publicKeyFile
string
The file containing the public key to decrypt the passphrase file.
Response
boolean
Result of storing the file.
set
Set a registry value.
set(string $path, mixed $value, string $separator = null) : mixed
since |
1.0 |
---|
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 |
---|
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 = array(), string $prefix = '') : void
since |
1.3.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 |
---|
Response
object
An an object holding the namespace data
toString
Get a namespace in a given string format
toString(string $format = 'JSON', mixed $options = array()) : string
since |
1.0 |
---|
Arguments
- $format
string
Format to return the string in- $options
mixed
Parameters used by the formatter, see formatters for more info
Response
string
Namespace in string format
Properties
method
Method to use for encryption.
since |
3.1.4 |
---|
Type(s)
string
iv
Initialisation vector for encryption method.
since |
3.1.4 |
---|
Type(s)
string
data
Registry Object
since |
1.0 |
---|
Type(s)
\stdClass
initialized
Flag if the Registry data object has been initialized
since |
1.5.2 |
---|
Type(s)
boolean
instances
Registry instances container.
since |
1.0 |
---|---|
deprecated |
2.0 Object caching will no longer be supported |
Type(s)
array<mixed,\Joomla\Registry\Registry>
separator
Path separator
since |
1.4.0 |
---|
Type(s)
string