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: {
- 157: $s
- 159: }
- 163: /**
- 164: * Indents the HTML content from the left.
- 169: */
- 171: {
- 173: $s = preg_replace_callback('#<(textarea|pre).*?</\\1#si', create_function('$m', 'return strtr($m[0], " \t\r\n", "\x1F\x1E\x1D\x1A");'), $s);
- 176: }
- 178: }
- 182: /**
- 183: * Date/time formatting.
- 187: */
- 189: {
- 192: }
- 198: }
- 202: /**
- 203: * Converts to human readable file size.
- 207: */
- 209: {
- 215: }
- 217: }
- 221: /**
- 222: * Returns array of string length.
- 225: */
- 227: {
- 229: }
- 233: /**
- 234: * Performs a search and replace.
- 239: */
- 241: {
- 243: }
- 247: /**
- 248: * Performs a regular expression search and replace.
- 253: */
- 255: {
- 257: }
- 261: /**
- 262: * /dev/null.
- 265: */
- 267: {
- 269: }
- 271: }