-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTraitsInfo.php
More file actions
74 lines (66 loc) · 1.5 KB
/
Copy pathTraitsInfo.php
File metadata and controls
74 lines (66 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/**
* efxphp (http://emilmalinov.com/efxphp)
*
* @copyright Copyright (c) 2015 Emil Malinov
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link http://github.com/emilkm/efxphp
* @package efxphp
*/
namespace emilkm\efxphp\Amf;
/**
* AVM+ Serialization optimizes object serialization by
* serializing the traits of a type once, and then
* sending only the values of each instance of the type
* as it occurs in the stream.
*
* @author Emil Malinov
* @package efxphp
* @subpackage amf
*/
class TraitsInfo
{
/**
* @var string
*/
public $className;
/**
* @var mixed
*/
public $dynamic;
/**
* @var mixed
*/
public $externalizable;
/**
* @var mixed
*/
public $properties;
/**
* @param string $className
* @param mixed $dynamic
* @param mixed $externalizable
* @param mixed $properties
*/
public function __construct($className, $dynamic, $externalizable, $properties = null)
{
$this->className = $className;
$this->dynamic = $dynamic;
$this->externalizable = $externalizable;
$this->properties = ($properties == null) ? array() : $properties;
}
/**
* @param mixed $value
*/
public function addProperty($value)
{
$this->properties[] = $value;
}
/**
* @return int The count of properties
*/
public function length()
{
return count($this->properties);
}
}