Source for file TemplateHelpers.php
Documentation is available at TemplateHelpers.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 11: */
- 15: /**
- 16: * Standard template run-time helpers shipped with Nette Framework.
- 17: *
- 20: */
- 22: {
- 24: /**
- 25: * Static class - cannot be instantiated.
- 26: */
- 28: {
- 30: }
- 34: /**
- 35: * Try to load the requested helper.
- 38: */
- 40: {
- 44: }
- 48: }
- 49: }
- 53: /**
- 54: * Escapes string for use inside HTML template.
- 57: */
- 59: {
- 62: }
- 64: }
- 68: /**
- 69: * Escapes string for use inside HTML comments.
- 72: */
- 74: {
- 75: // -- has special meaning in different browsers
- 77: }
- 81: /**
- 82: * Escapes string for use inside XML 1.0 template.
- 85: */
- 87: {
- 88: // XML 1.0: \x09 \x0A \x0D and C1 allowed directly, C0 forbidden
- 89: // XML 1.1: \x00 forbidden directly and as a character reference, \x09 \x0A \x0D \x85 allowed directly, C0, C1 and \x7F allowed as character references
- 91: }
- 95: /**
- 96: * Escapes string for use inside CSS template.
- 99: */
- 101: {
- 102: // http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q6
- 104: }
- 108: /**
- 109: * Escapes string for use inside HTML style attribute.
- 112: */
- 114: {
- 116: }
- 120: /**
- 121: * Escapes string for use inside JavaScript template.
- 124: */
- 126: {
- 129: }
- 131: }
- 135: /**
- 136: * Escapes string for use inside HTML JavaScript attribute.
- 139: */
- 141: {
- 143: }
- 147: /**
- 148: * Replaces all repeated white spaces with a single space.
- 151: */
- 153: {
- 154: $s = preg_replace_callback('#<(textarea|pre|script).*?</\\1#si', array(__CLASS__, 'indentCb'), $s);
- 157: }
- 161: /**
- 162: * Indents the HTML content from the left.
- 167: */
- 169: {
- 174: }
- 176: }
- 180: /**
- 181: * Callback for self::indent
- 182: */
- 184: {
- 186: }
- 190: /**
- 191: * Date/time formatting.
- 195: */
- 197: {
- 200: }
- 206: }
- 210: /**
- 211: * Converts to human readable file size.
- 215: */
- 217: {
- 223: }
- 225: }
- 229: /**
- 230: * Returns array of string length.
- 233: */
- 235: {
- 237: }
- 241: /**
- 242: * Performs a search and replace.
- 247: */
- 249: {
- 251: }
- 255: /**
- 256: * Performs a regular expression search and replace.
- 261: */
- 263: {
- 265: }
- 269: /**
- 270: * /dev/null.
- 273: */
- 275: {
- 277: }
- 279: }