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 https://nette.org
- 12: *
- 19: */
- 23: /**
- 24: * Standard template helpers shipped with Nette Framework.
- 25: *
- 29: */
- 31: {
- 33: /**
- 34: * Static class - cannot be instantiated.
- 35: */
- 37: {
- 39: }
- 43: /**
- 44: * Try to load the requested helper.
- 47: */
- 49: {
- 54: }
- 59: }
- 60: }
- 64: /**
- 65: * Escapes string for use inside HTML template.
- 68: */
- 70: {
- 73: }
- 75: }
- 79: /**
- 80: * Escapes string for use inside XML 1.0 template.
- 83: */
- 85: {
- 86: // XML 1.0: \x09 \x0A \x0D and C1 allowed directly, C0 forbidden
- 87: // 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
- 89: }
- 93: /**
- 94: * Escapes string for use inside CSS template.
- 97: */
- 99: {
- 100: // http://www.w3.org/TR/2006/WD-CSS21-20060411/syndata.html#q6
- 102: }
- 106: /**
- 107: * Escapes string for use inside HTML style attribute.
- 110: */
- 112: {
- 114: }
- 118: /**
- 119: * Escapes string for use inside JavaScript template.
- 122: */
- 124: {
- 126: }
- 130: /**
- 131: * Escapes string for use inside HTML JavaScript attribute.
- 134: */
- 136: {
- 138: }
- 142: /**
- 143: * Replaces all repeated white spaces with a single space.
- 146: */
- 148: {
- 150: }
- 154: /**
- 155: * Indents the HTML content from the left.
- 160: */
- 162: {
- 167: }
- 169: }
- 173: /**
- 174: * Callback for self::indent
- 175: */
- 177: {
- 179: }
- 183: /**
- 184: * Date/time formatting.
- 188: */
- 190: {
- 191: $value = is_numeric($value) ? (int) $value : ($value instanceof DateTime ? $value->format('U') : strtotime($value));
- 193: }
- 197: /**
- 198: * Converts to human readable file size.
- 201: */
- 203: {
- 209: }
- 211: }
- 213: }