Properties

$instance

$instance : mixed

Private static variable to hold the single instance of the class.

Type

mixed — Default null

Methods

instance()

instance() : \MainWP\Dashboard\Instance

Method instance()

Create a public static instance.

Returns

\MainWP\Dashboard\Instance —

class.

get_class_name()

get_class_name() : object

Method get_class_name()

Get Class Name.

Returns

object —

Class name.

auto_load_files()

auto_load_files() 

Method auto_load_files()

Handle autoload files.

get_keys_value()

get_keys_value(string  $name, mixed  $default_value = false) : string

Method get_keys_value()

Get decrypt value.

Parameters

string $name

Name of key.

mixed $default_value

Default value.

Returns

string —

Decrypt value.

update_key_value()

update_key_value(mixed  $option_name, mixed  $value = false, mixed  $prefix = 'dash_') : string

Method update_key_value()

Get decrypt value.

Parameters

mixed $option_name

option name.

mixed $value

The option value.

mixed $prefix

The prefix value.

Returns

string —

Decrypt value.

delete_key_file()

delete_key_file(string  $file_key) : string

Method delete_key_file()

Delete key file.

Parameters

string $file_key

Name of key file.

Returns

string —

Deleted.

get_key_val()

get_key_val(mixed  $key_file) : string

Method get_key_val()

Get decrypt value.

Parameters

mixed $key_file

The value key.

Returns

string —

Decrypt value.

init_keys_dir()

init_keys_dir(mixed  $keysDir = '') : void

Method init_keys_dir()

Check for keys directory and create it if it doesn't already exist, set the file permissions and update htaccess.

Parameters

mixed $keysDir

Keys directory.

get_keys_dir()

get_keys_dir() : string

Method get_keys_dir().

Check for keys directory and create it if it doesn't already exist. set the file permissions and update htaccess.

Returns

string —

Keys dir.

encrypt_keys_data()

encrypt_keys_data(mixed  $data, string  $prefix, string  $key_file = false) : string

Method encrypt_keys_data()

Handle encrypt value.

Parameters

mixed $data

The value to encrypt.

string $prefix

prefix key file name.

string $key_file

key file name.

Returns

string —

Encrypted value.

decrypt_keys_data()

decrypt_keys_data(string  $encrypted, mixed  $default_value = false) : string

Method decrypt_keys_data()

Get decrypt value.

Parameters

string $encrypted

Name of key.

mixed $default_value

Default value.

Returns

string —

Decrypt value.

get_decrypt_values()

get_decrypt_values(mixed  $encodedValue, mixed  $key_file, mixed  $default_value = '') : string

Method get_decrypt_values()

Get decrypt value.

Parameters

mixed $encodedValue

Encoded The value to decrypt.

mixed $key_file

The value key.

mixed $default_value

The default value.

Returns

string —

Decrypt value.

encrypt_value()

encrypt_value(mixed  $keypass, string  $name, string  $prefix) : string

Method encrypt_value()

Handle encrypt value.

Parameters

mixed $keypass

The value to encrypt.

string $name

Option name of encrypted data.

string $prefix

using for prefix key file name.

Returns

string —

Encrypted value.

decrypt_value()

decrypt_value(mixed  $encodedValue, mixed  $key) : string

Method decrypt_value()

Handle decrypt value.

Parameters

mixed $encodedValue

The value to decrypt.

mixed $key

Key to decrypt.

Returns

string —

Decrypt value.

save_key_file()

save_key_file(mixed  $key_file, mixed  $key_val) : mixed

Method save_key_file()

Handle save key passwd.

Parameters

mixed $key_file

The value key.

mixed $key_val

The value.

Returns

mixed —

Result.

encrypt_with_key()

encrypt_with_key(mixed  $keypass, mixed  $key) : string

Method encrypt_with_key()

Handle encrypt value.

Parameters

mixed $keypass

The value to encrypt.

mixed $key

Key to encrypt.

Returns

string —

Encrypted value.

decrypt_with_key()

decrypt_with_key(mixed  $encodedValue, mixed  $key) : string

Method decrypt_with_key()

Handle decrypt value.

Parameters

mixed $encodedValue

The string to decrypt.

mixed $key

Key to decrypt.

Returns

string —

Decrypt value.