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: {
- 165: }
- 169: /**
- 170: * Indents the HTML content from the left.
- 175: */
- 177: {
- 182: }
- 184: }
- 188: /**
- 189: * Callback for self::indent
- 190: */
- 192: {
- 194: }
- 198: /**
- 199: * Date/time formatting.
- 203: */
- 205: {
- 206: $value = is_numeric($value) ? (int) $value : ($value instanceof DateTime ? $value->format('U') : strtotime($value));
- 208: }
- 212: /**
- 213: * Converts to human readable file size.
- 217: */
- 219: {
- 225: }
- 227: }
- 231: /**
- 232: * /dev/null.
- 235: */
- 237: {
- 239: }
- 241: }