Namespaces

  • Latte
    • Loaders
    • Macros
    • Runtime
  • Nette
    • Application
      • Responses
      • Routers
      • UI
    • Bridges
      • ApplicationDI
      • ApplicationLatte
      • ApplicationTracy
      • CacheDI
      • CacheLatte
      • DatabaseDI
      • DatabaseTracy
      • DITracy
      • FormsDI
      • FormsLatte
      • Framework
      • HttpDI
      • HttpTracy
      • MailDI
      • ReflectionDI
      • SecurityDI
      • SecurityTracy
    • Caching
      • Storages
    • ComponentModel
    • Database
      • Conventions
      • 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
    • Bridges
      • Nette

Classes

  • Encoder
  • Entity
  • Neon

Exceptions

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