Source for file TemplateHelpers.php
Documentation is available at TemplateHelpers.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 22: /**
- 23: * Standard template run-time helpers shipped with Nette Framework.
- 24: *
- 28: */
- 30: {
- 32: /**
- 33: * Static class - cannot be instantiated.
- 34: */
- 36: {
- 38: }
- 42: /**
- 43: * Try to load the requested helper.
- 46: */
- 48: {
- 53: }
- 58: }
- 59: }
- 63: /**
- 64: * Escapes string for use inside HTML template.
- 67: */
- 69: {
- 72: }
- 74: }
- 78: /**
- 79: * Escapes string for use inside HTML comments.
- 82: */
- 84: {
- 85: // -- has special meaning in different browsers
- 87: }
- 91: /**
- 92: * Escapes string for use inside XML 1.0 template.
- 95: */
- 97: {
- 98: // XML 1.0: \x09 \x0A \x0D and C1 allowed directly, C0 forbidden
- 99: // 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
- 101: }
- 105: /**
- 106: * Escapes string for use inside CSS template.
- 109: */
- 111: {
- 112: // http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q6
- 114: }
- 118: /**
- 119: * Escapes string for use inside HTML style attribute.
- 122: */
- 124: {
- 126: }
- 130: /**
- 131: * Escapes string for use inside JavaScript template.
- 134: */
- 136: {
- 139: }
- 141: }
- 145: /**
- 146: * Escapes string for use inside HTML JavaScript attribute.
- 149: */
- 151: {
- 153: }
- 157: /**
- 158: * Replaces all repeated white spaces with a single space.
- 161: */
- 163: {
- 164: $s = preg_replace_callback('#<(textarea|pre|script).*?</\\1#si', array(__CLASS__, 'indentCb'), $s);
- 167: }
- 171: /**
- 172: * Indents the HTML content from the left.
- 177: */
- 179: {
- 184: }
- 186: }
- 190: /**
- 191: * Callback for self::indent
- 192: */
- 194: {
- 196: }
- 200: /**
- 201: * Date/time formatting.
- 205: */
- 207: {
- 213: }
- 218: }
- 222: /**
- 223: * Converts to human readable file size.
- 227: */
- 229: {
- 235: }
- 237: }
- 241: /**
- 242: * Returns array of string length.
- 245: */
- 247: {
- 249: }
- 253: /**
- 254: * Performs a search and replace.
- 259: */
- 261: {
- 263: }
- 267: /**
- 268: * Performs a regular expression search and replace.
- 273: */
- 275: {
- 277: }
- 281: /**
- 282: * /dev/null.
- 285: */
- 287: {
- 289: }
- 291: }