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
      • Table
    • DI
      • Config
        • Adapters
      • Extensions
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Loaders
    • Localization
    • Mail
    • Neon
    • PhpGenerator
      • Traits
    • Reflection
    • Security
    • Tokenizer
    • Utils
  • Tracy
    • Bridges
      • Nette
  • none

Classes

  • Decoder
  • Encoder
  • Entity
  • Neon

Exceptions

  • Exception
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Other releases
 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:  * Representation of 'foo(bar=1)' literal
13:  */
14: class Entity extends \stdClass
15: {
16:     /** @var mixed */
17:     public $value;
18: 
19:     /** @var array */
20:     public $attributes;
21: 
22: 
23:     public function __construct($value = null, array $attrs = null)
24:     {
25:         $this->value = $value;
26:         $this->attributes = (array) $attrs;
27:     }
28: 
29: 
30:     public static function __set_state(array $properties)
31:     {
32:         return new self($properties['value'], $properties['attributes']);
33:     }
34: }
35: 
Nette 2.4-20180918 API API documentation generated by ApiGen 2.8.0