Encoding of data for various outputs
This is the code documentation for the SproutCMS project
Search documentation |
class EncEncoding of data for various outputs
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-16
**/
class NewClassName extends Enc {
/**
* Encoding for HTML
* Existing HTML entities in a string will be double-encoded
**/
public function html (string $value) {
// Method code goes here
}
/**
* Encoding for HTML, but safe from double-encoding of existing entities
**/
public function htmlNoDup (string $value) {
// Method code goes here
}
/**
* Encoding for XML
**/
public function xml (string $value) {
// Method code goes here
}
/**
* Encoding for a part of a URL (i.e. GET parameter value
**/
public function url (string $value) {
// Method code goes here
}
/**
* Encoding for ID or CLASS attributes
**/
public function id (string $value) {
// Method code goes here
}
/**
* Encoding for going inside a JS string
**/
public function js (string $value) {
// Method code goes here
}
/**
* Encoding for field name in a form element
**/
public function httpfield (string $value) {
// Method code goes here
}
/**
* Nice name of something when dealing with friendly URLs.
* This provides the backend for {@see Slug::create}
**/
public function urlname (string $value, $delimiter) {
// Method code goes here
}
/**
* 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 function jsdate (string $value, string $from) {
// Method code goes here
}
/**
* Strip funky stuff from a string.
* Funky stuff is anything in the ASCII control plane (0x00 - 0x1F)
* Except tab, line feed, carriage return
**/
public function cleanfunky ($value) {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|