1 | <?php |
||
28 | trait AttributeTrait |
||
29 | { |
||
30 | use StaticVarTrait; // methods dealing with class static attributes |
||
31 | |||
32 | /** |
||
33 | * Instance attributes |
||
34 | * |
||
35 | * @var array |
||
36 | * @access protected |
||
37 | */ |
||
38 | protected $attributes = []; |
||
39 | |||
40 | /** |
||
41 | * {@inheritDoc} |
||
42 | */ |
||
43 | public function setAttribute(/*# string */ $attrName, $attrValue) |
||
48 | |||
49 | /** |
||
50 | * {@inheritDoc} |
||
51 | */ |
||
52 | public function addAttribute(/*# string */ $attrName, $attrValue) |
||
60 | |||
61 | /** |
||
62 | * {@inheritDoc} |
||
63 | */ |
||
64 | public function getAttribute(/*# string */ $attrName) |
||
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | public function setAttributes(array $attributes) |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function getAttributes()/*# : array */ |
||
88 | } |
||
89 |