class JUtility


Located at : UKNOWVA_ROOT/libraries/joomla/utilities/utility.php

JUtility is a utility functions class

Methods

static boolean
sendMail(string $from, string $fromname, mixed $recipient, string $subject, string $body, boolean $mode, mixed $cc = null, mixed $bcc = null, mixed $attachment = null, mixed $replyto = null, mixed $replytoname = null) deprecated

Mail function (uses phpMailer)

static boolean
sendAdminMail(string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, string $url = null) deprecated

Sends mail to administrator for approval of a user submission

static string
getHash(string $seed) deprecated

Provides a secure hash based on a seed

static string
getToken(boolean $forceNew = false) deprecated

Method to determine a hash for anti-spoofing variable names

static array
parseAttributes(string $string)

Method to extract key/value pairs out of a string with XML style attributes

static boolean
isWinOS() deprecated

Method to determine if the host OS is Windows

static string
dump(mixed $var, boolean $htmlSafe = true) deprecated

Method to dump the structure of a variable for debugging purposes

integer
array_unshift_ref(array $array, mixed $value) deprecated

Prepend a reference to an element to the beginning of an array.

integer
return_bytes(string $val) deprecated

Return the byte value of a particular string

Details

at line 42
static boolean sendMail(string $from, string $fromname, mixed $recipient, string $subject, string $body, boolean $mode, mixed $cc = null, mixed $bcc = null, mixed $attachment = null, mixed $replyto = null, mixed $replytoname = null) deprecated

deprecated 12.1

Mail function (uses phpMailer)

Parameters

string $from From email address
string $fromname From name
mixed $recipient Recipient email address(es)
string $subject Email subject
string $body Message body
boolean $mode False = plain text, true = HTML
mixed $cc CC email address(es)
mixed $bcc BCC email address(es)
mixed $attachment Attachment file name(s)
mixed $replyto Reply to email address(es)
mixed $replytoname Reply to name(s)

Return Value

boolean True on success

See also

JMail::sendMail()

at line 70
static boolean sendAdminMail(string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, string $url = null) deprecated

deprecated 12.1

Sends mail to administrator for approval of a user submission

Parameters

string $adminName Name of administrator
string $adminEmail Email address of administrator
string $email [NOT USED]
string $type Type of item to approve
string $title Title of item to approve
string $author Author of item to approve
string $url url

Return Value

boolean True on success

See also

JMail::sendAdminMail()

at line 92
static string getHash(string $seed) deprecated

deprecated 12.1

Provides a secure hash based on a seed

Parameters

string $seed Seed string.

Return Value

string

See also

JApplication:getHash()

at line 110
static string getToken(boolean $forceNew = false) deprecated

deprecated 12.1

Method to determine a hash for anti-spoofing variable names

Parameters

boolean $forceNew Force creation of a new token.

Return Value

string Hashed var name

See also

JApplication:getHash()

at line 125
static array parseAttributes(string $string)

Method to extract key/value pairs out of a string with XML style attributes

Parameters

string $string String containing XML style attributes

Return Value

array Key/Value pairs for the attributes

at line 154
static boolean isWinOS() deprecated

deprecated 12.1

Method to determine if the host OS is Windows

Return Value

boolean True if Windows OS.

See also

JApplication::isWinOS()

at line 172
static string dump(mixed $var, boolean $htmlSafe = true) deprecated

deprecated 12.1

Method to dump the structure of a variable for debugging purposes

Parameters

mixed $var &$var A variable
boolean $htmlSafe True to ensure all characters are htmlsafe

Return Value

string

at line 192
integer array_unshift_ref(array $array, mixed $value) deprecated

deprecated 12.1

Prepend a reference to an element to the beginning of an array.

Renumbers numeric keys, so $value is always inserted to $array[0]

Parameters

array $array &$array Array to be modified
mixed $value &$value Value to add

Return Value

integer

See also

http://www.php.net/manual/en/function.array-unshift.php#40270

at line 211
integer return_bytes(string $val) deprecated

deprecated 12.1

Return the byte value of a particular string

Parameters

string $val String optionally with G, M or K suffix

Return Value

integer size in bytes

See also

JHtmlNumber::bytes