SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Enc

Encoding of data for various outputs

Functions

NameVisibilityDescription
cleanfunkypublic (static)Strip funky stuff from a string.
htmlpublic (static)Encoding for HTML
htmlNoDuppublic (static)Encoding for HTML, but safe from double-encoding of existing entities
httpfieldpublic (static)Encoding for field name in a form element
idpublic (static)Encoding for ID or CLASS attributes
jspublic (static)Encoding for going inside a JS string
jsdatepublic (static)Returns the JS code needed to initialise a Date() object with the specified date.
urlpublic (static)Encoding for a part of a URL (i.e. GET parameter value
urlnamepublic (static)Nice name of something when dealing with friendly URLs.
xmlpublic (static)Encoding for XML

public cleanfunky

unknown Enc::cleanfunky ( mixed $value );

Strip funky stuff from a string.
Funky stuff is anything in the ASCII control plane (0x00 - 0x1F)
Except tab, line feed, carriage return

public html

string Enc::html ( string $value );

Encoding for HTML
Existing HTML entities in a string will be double-encoded

public htmlNoDup

string Enc::htmlNoDup ( string $value );

Encoding for HTML, but safe from double-encoding of existing entities

public httpfield

unknown Enc::httpfield ( string $value );

Encoding for field name in a form element

public id

unknown Enc::id ( string $value );

Encoding for ID or CLASS attributes

public js

unknown Enc::js ( string $value );

Encoding for going inside a JS string

public jsdate

null|string Enc::jsdate ( string $value [, string $from ] );

Returns the JS code needed to initialise a Date() object with the specified date.
This should only be used for dates. For times or date-times, use a different function.

From types:
  'mysql' - a mysql-formatted date in the form YYYY-MM-DD
  'array' - an array [ <day> , <month> , <year> ]

public url

unknown Enc::url ( string $value );

Encoding for a part of a URL (i.e. GET parameter value

public urlname

string Enc::urlname ( string $value [, mixed $delimiter ] );

Nice name of something when dealing with friendly URLs.
This provides the backend for Slug::create

public xml

unknown Enc::xml ( string $value );

Encoding for XML