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: