Class JUtility

Description

JUtility is a utility functions class

  • since: 11.1

Located in /libraries/joomla/utilities/utility.php (line 19)


	
			
Method Summary
static string dump (mixed &$var, [boolean $htmlSafe = true])
static string getHash (string $seed)
static string getToken ([boolean $forceNew = false])
static boolean isWinOS ()
static array parseAttributes (string $string)
static boolean sendAdminMail (string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, [string $url = null])
static boolean sendMail (string $from, string $fromname, mixed $recipient, string $subject, string $body, [boolean $mode = 0], [mixed $cc = null], [mixed $bcc = null], [mixed $attachment = null], [mixed $replyto = null], [mixed $replytoname = null])
integer array_unshift_ref (array &$array, mixed &$value)
integer return_bytes (string $val)
Methods
static method dump (line 181)

Method to dump the structure of a variable for debugging purposes

  • deprecated: 12.1
  • since: 11.1
  • access: public
static string dump (mixed &$var, [boolean $htmlSafe = true])
  • mixed &$var: A variable
  • boolean $htmlSafe: True to ensure all characters are htmlsafe
static method getHash (line 93)

Provides a secure hash based on a seed

static string getHash (string $seed)
  • string $seed: Seed string.
static method getToken (line 112)

Method to determine a hash for anti-spoofing variable names

  • return: Hashed var name
  • see: JSession::getFormToken()
  • deprecated: 12.1 Use JSession::getFormToken() instead
  • since: 11.1
  • access: public
static string getToken ([boolean $forceNew = false])
  • boolean $forceNew: Force creation of a new token.
static method isWinOS (line 160)

Method to determine if the host OS is Windows.

static boolean isWinOS ()
static method parseAttributes (line 130)

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

  • return: Key/Value pairs for the attributes
  • since: 11.1
  • access: public
static array parseAttributes (string $string)
  • string $string: String containing XML style attributes
static method sendAdminMail (line 71)

Sends mail to administrator for approval of a user submission

static boolean sendAdminMail (string $adminName, string $adminEmail, string $email, string $type, string $title, string $author, [string $url = null])
  • 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
static method sendMail (line 42)

Mail function (uses phpMailer)

  • return: True on success
  • see: JMail::sendMail()
  • deprecated: 12.1
  • since: 11.1
  • access: public
static boolean sendMail (string $from, string $fromname, mixed $recipient, string $subject, string $body, [boolean $mode = 0], [mixed $cc = null], [mixed $bcc = null], [mixed $attachment = null], [mixed $replyto = null], [mixed $replytoname = null])
  • 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)
array_unshift_ref (line 205)

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

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

  • see: 40270
  • deprecated: 12.1
  • since: 11.1
  • access: public
integer array_unshift_ref (array &$array, mixed &$value)
  • array &$array: Array to be modified
  • mixed &$value: Value to add
return_bytes (line 227)

Return the byte value of a particular string

  • return: Size in bytes
  • see: JHtmlNumber::bytes
  • deprecated: 12.1
  • since: 11.1
  • access: public
integer return_bytes (string $val)
  • string $val: String optionally with G, M or K suffix

Documentation generated on Mon, 25 Jun 2012 14:00:33 -0500 by phpDocumentor 1.4.4