Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationLatte
      • ApplicationTracy
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsLatte
      • Framework
      • HttpTracy
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Drivers
      • Reflection
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
    • Reflection
    • Security
    • Templating
    • Utils
  • NetteModule
  • none
  • Tracy

Classes

  • Encoder
  • Entity
  • Neon

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
  • Nette homepage
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (https://nette.org)
 5:  * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
 6:  */
 7: 
 8: namespace Nette\Neon;
 9: 
10: 
11: /**
12:  * Simple parser & generator for Nette Object Notation.
13:  *
14:  * @author     David Grudl
15:  */
16: class Neon
17: {
18:     const BLOCK = Encoder::BLOCK;
19: 
20: 
21:     /**
22:      * Returns the NEON representation of a value.
23:      * @param  mixed
24:      * @param  int
25:      * @return string
26:      */
27:     public static function encode($var, $options = NULL)
28:     {
29:         $encoder = new Encoder;
30:         return $encoder->encode($var, $options);
31:     }
32: 
33: 
34:     /**
35:      * Decodes a NEON string.
36:      * @param  string
37:      * @return mixed
38:      */
39:     public static function decode($input)
40:     {
41:         $decoder = new Decoder;
42:         return $decoder->decode($input);
43:     }
44: 
45: }
46: 
Nette 2.2 API documentation generated by ApiGen 2.8.0