Документация по Joomla 1.7

Joomla.Platform\JUtility
libraries/joomla/utilities/utility.php at line 19

Class JUtility

JUtility

public class JUtility

JUtility is a utility functions class

Subpackage:
Utilities
Since:
11.1

Method Summary
static boolean

sendMail(string from, string fromname, mixed recipient, string subject, string body, boolean mode, mixed cc, mixed bcc, mixed attachment, mixed replyto, mixed replytoname)

Mail function (uses phpMailer)

static boolean

sendAdminMail(string adminName, string adminEmail, string email, string type, string title, string author, string url)

Sends mail to administrator for approval of a user submission

static string

getHash(string seed)

Provides a secure hash based on a seed

static string

getToken(boolean forceNew)

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()

Method to determine if the host OS is Windows

static string

dump(mixed &$var, boolean htmlSafe, mixed var)

Method to dump the structure of a variable for debugging purposes

integer

array_unshift_ref(array &$array, mixed &$value, mixed array, mixed value)

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

integer

return_bytes(string val)

Return the byte value of a particular string

Method Detail

libraries/joomla/utilities/utility.php at line 42

sendMail

public static boolean sendMail(string from, string fromname, mixed recipient, string subject, string body, boolean mode, mixed cc, mixed bcc, mixed attachment, mixed replyto, mixed replytoname)

Mail function (uses phpMailer)

Parameters:
from - From email address
fromname - From name
recipient - Recipient email address(es)
subject - Email subject
body - Message body
mode - False = plain text, true = HTML
cc - CC email address(es)
bcc - BCC email address(es)
attachment - Attachment file name(s)
replyto - Reply to email address(es)
replytoname - Reply to name(s)
Returns:
True on success
Since:
11.1
Deprecated:
12.1
See Also:
JMail::sendMail()

libraries/joomla/utilities/utility.php at line 70

sendAdminMail

public static boolean sendAdminMail(string adminName, string adminEmail, string email, string type, string title, string author, string url)

Sends mail to administrator for approval of a user submission

Parameters:
adminName - Name of administrator
adminEmail - Email address of administrator
email - [NOT USED]
type - Type of item to approve
title - Title of item to approve
author - Author of item to approve
url - url
Returns:
True on success
Since:
11.1
Deprecated:
12.1
See Also:
JMail::sendAdminMail()

libraries/joomla/utilities/utility.php at line 92

getHash

public static string getHash(string seed)

Provides a secure hash based on a seed

Parameters:
seed - Seed string.
Since:
11.1
Deprecated:
12.1
See Also:
JApplication:getHash()

libraries/joomla/utilities/utility.php at line 110

getToken

public static string getToken(boolean forceNew)

Method to determine a hash for anti-spoofing variable names

Parameters:
forceNew - Force creation of a new token.
Returns:
Hashed var name
Since:
11.1
Deprecated:
12.1
See Also:
JApplication:getHash()

libraries/joomla/utilities/utility.php at line 125

parseAttributes

public static array parseAttributes(string string)

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

Parameters:
string - String containing XML style attributes
Returns:
Key/Value pairs for the attributes
Since:
11.1

libraries/joomla/utilities/utility.php at line 154

isWinOS

public static boolean isWinOS()

Method to determine if the host OS is Windows

Returns:
True if Windows OS.
Since:
11.1
Deprecated:
12.1
See Also:
JApplication::isWinOS()

libraries/joomla/utilities/utility.php at line 172

dump

public static string dump(mixed &$var, boolean htmlSafe, mixed var)

Method to dump the structure of a variable for debugging purposes

Parameters:
&$var - A variable
htmlSafe - True to ensure all characters are htmlsafe
Since:
11.1
Deprecated:
12.1

libraries/joomla/utilities/utility.php at line 192

array_unshift_ref

public integer array_unshift_ref(array &$array, mixed &$value, mixed array, mixed value)

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 to be modified
&$value - Value to add
Since:
11.1
Deprecated:
12.1
See Also:
http://www.php.net/manual/en/function.array-unshift.php#40270

libraries/joomla/utilities/utility.php at line 211

return_bytes

public integer return_bytes(string val)

Return the byte value of a particular string

Parameters:
val - String optionally with G, M or K suffix
Returns:
size in bytes
Since:
11.1
Deprecated:
12.1
See Also:
JHtmlNumber::bytes

Документация по Joomla 1.7